This file contains hidden or 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
mogrify -path ./resized -filter Triangle -define filter:support=2 -thumbnail WIDTH -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB -strip * |
This file contains hidden or 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
window.onscroll = function() { | |
if (window.scrollY + 1 > document.body.clientHeight - window.innerHeight) { | |
// load more data | |
} | |
} |
This file contains hidden or 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
sudo sysctl vm.swappiness=0 |
This file contains hidden or 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
scrypt-kdf password site 32768 20 20 28 | |
# To avoid plain text password input, use the one liner: | |
while read site && read -s pass; do scrypt-kdf $pass $site `python -c "print(2**15)"` 20 20 28; break; done; pass="" |
This file contains hidden or 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
sudo su | |
echo z3fold >> /etc/initramfs-tools/modules | |
update-initramfs -u |
This file contains hidden or 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
sudo env "PATH=$PATH" command |
This file contains hidden or 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
# when `su` raises authentication error is probably because root password is not set | |
# you can login with your sudo enabled account and password | |
sudo su | |
# or you can set a password for root | |
sudo passwd root | |
# after that, you can do `su` and login with the password set before |
This file contains hidden or 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
rclone sync ~/Dropbox/ dropbox: --exclude ".*" | |
# --exclude ".*" is necessary to avoid errors |
This file contains hidden or 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
sudo convmv -f iso-8859-1 -t utf-8 -r . |
This file contains hidden or 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
# x: This option tells tar to extract the files. | |
# v: The “v” stands for “verbose.” This option will list all of the files one by one in the archive. | |
# z: The z option is very important and tells the tar command to uncompress the file (gzip) or j (bZip2). | |
# f: This options tells tar that you are going to give it a file name to work with. | |
tar xvzf file.tar.gz | |
tar xvjf file.tar.bz2 | |
# Extract to other directory |
NewerOlder