This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
lsmod | grep -qs drivetemp || sudo modprobe drivetemp | |
echo SATA | |
find /sys/devices -name vpd_pg89 | while read PG89; do | |
dd if=$PG89 conv=swab status=none bs=1 count=40 skip=114 | |
echo -n ' ' | |
dd if=$PG89 conv=swab status=none bs=1 count=20 skip=80 | |
echo -n ' ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/apt/preferences.d/nosnap.pref | |
Package: snapd | |
Pin: release a=* | |
Pin-Priority: -10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Mandiri MCM2: fix input type | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Fix input types in Mandiri MCM2 | |
// @author wpyoga | |
// @match https://mcm2.bankmandiri.co.id/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=mcm2.bankmandiri.co.id | |
// @grant none | |
// @run-at document-start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name KlikBCA: fix input type | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Fix input types in KlikBCA | |
// @author william.poetra@gmail.com | |
// @match https://ibank.klikbca.com/*.do | |
// @match https://ibank.klikbca.com/*.do?* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=klikbca.com | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sometimes `apt upgrade` says "... packages have been kept back:". | |
To see the decision making: | |
``` | |
$ sudo apt upgrade -oDebug::pkgProblemResolver=1 | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -c:v libx264 -preset veryslow -pix_fmt yuv420p -vf scale=960:540 -crf 25 -an output.mp4 | |
# -c:v libx264 | |
# use libx264 for encoding | |
# -preset veryslow | |
# use the veryslow preset to produce very high quality videos | |
# -pix_fmt yuv420p | |
# use yuv420p format, suitable for most videos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace 'adb' with the desired process name | |
ps -o pid,args `pidof adb` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -crop 2250x1518+0+0 | |
# crop the image to 2250x1518 | |
# without this, the image will be resized to | |
# - 800x541, if using the geometry transform | |
# - 799x540, if using the resize transform | |
# | |
# +repage | |
# reset the virtual canvas to the image size, which has been cropped | |
# | |
# -geometry 800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg_concat() ( | |
test "$#" -lt 1 && return | |
LISTFILE="`mktemp -p .`" | |
printf "file '%s'\n" "$@" > "$LISTFILE" | |
ffmpeg -f concat -safe 0 -i "$LISTFILE" -c copy concat.mp4 | |
rm "$LISTFILE" | |
) | |
# to split video into multiple segments based on key frames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -lossless | |
# create a lossless image | |
# you can use '-z 9' to really make a small image, | |
# but my tests show that it only produces around 1% better compression rate, | |
# with much longer compression times | |
# | |
# -resize 1080 1920 | |
# (optional) resize the image | |
cwebp -lossless -resize 1080 1920 image.png -o image.webp |