Below you will find pages that utilize the taxonomy term “Shell”
Logs
read more
Kindle Video Playback Hack
Prerequsite
- The Kindle needs to be jailbroken.
- Terimnal access on Kindle (Kterm or SSH)
- Generate a directory to store all temporary files on Kindle, using
/mnt/us/demo/for example in this tutorial.
- Generate a directory to store all temporary files on Kindle, using
- FFmpeg
Slice Video Frames
i=INPUT.mp4; w=1236; h=1648;
# Adjust resolution accordingly:
# - Kindle Paperwhite (11th gen.): 1236x1648
# - Kindle Paperwhite (12th gen.): 1264×1680
# - Kindle Colorsoft: 1264×1680
mkdir -p ./frames && ffmpeg -i "$i" \
-vf "transpose=1,\
scale=$w:$h:force_original_aspect_ratio=decrease,\
pad=$w:$h:(ow-iw)/2:(oh-ih)/2,\
format=gray" \
-r 5 ./frames/frames_%04d.png
Copy all PNG images (the frames folder) to Kindle, put under /mnt/us/demo/.
Logs
read more
Zsh History File Encoding Issue with UTF-8 Characters
Issue Description
When opening .zsh_history file via vim, some UTF-8 encoded characters (e.g. Japanese, Chinese characters) are not displayed correctly, and vim shows the fileencoding as latin1 instead of utf-8.
-
For example, the following shows how Japanese/Chinese characters are displayed incorrectly in vim:
2466 : 1762759121:0;locale 2467 : 1762759501:0;echo "ä½<83><80>好" 2468 : 1762759519:0;echo "ã<81><83>³ã<82><83>³ã<81>«ã<81><83><81>ã<81>¯" -
The actual content of the
.zsh_historyfile is as follows: