Skip to content

Instantly share code, notes, and snippets.

View u1i's full-sized avatar

Uli u1i

View GitHub Profile
@u1i
u1i / doit.sh
Created March 9, 2022 07:27
Bash tab completion - stop adding backslash
shopt -u progcomp
@u1i
u1i / doit.sh
Created February 5, 2022 04:01
GitHub: find out where ssh key is used
ssh -T -ai ~/.ssh/id_rsa [email protected]
@u1i
u1i / doit.sh
Created February 5, 2022 02:52
MacOS: hide Dock
defaults write com.apple.dock tilesize -int 1
killall Dock
@u1i
u1i / doit.sh
Last active January 12, 2022 06:22
Imagemagick colorize
convert in.jpg -colorspace gray -fill green -tint 100 -out.jpg
-charcoal 1 -colorspace gray -fill blue -tint 10
@u1i
u1i / doit.sh
Last active January 12, 2022 04:51
imagemagick fax look
convert in.jpg -colorspace gray ( +clone -blur 15,15 ) -compose Divide_Src -composite -normalize -threshold 80% out.jpg
convert original.pdf -colorspace gray +clone -blur 0x1 +swap -compose divide -composite -linear-stretch 5%x0% -rotate 1.5 fake-scanned.pdf
convert -density 150 input.pdf -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian output.pdf
@u1i
u1i / doit.sh
Created January 4, 2022 11:31
ImageMagick: combine images
# vertical
convert -append image1.jpg image2.jpg out.jpg
# horizontal
convert +append image1.jpg image2.jpg out.jpg
@u1i
u1i / doit.sh
Created December 24, 2021 02:22
imagemagick create polaroid
convert input.jpg -thumbnail 300x300 \
-bordercolor Lavender -background gray40 +polaroid \
poloroid_captioned.png
@u1i
u1i / info.txt
Created December 8, 2021 13:33
Python3 Virtualenv
python3 -m venv
@u1i
u1i / info.txt
Created November 11, 2021 09:10
byobu hotkets
ctrl-a + ? - help
ctrl-a + \ - kill byobu
shift-f6 - detach without kill
ctrl-a + ctrl-d - detach without kill
// Windows management
ctrl-a + c - create new window
ctrl-a + k - kill current window
ctrl-a + " - choose window from list
ctrl-a + s - choose window from list
ctrl-a + ctrl-space - next window
/network add -sasl_username <login> -sasl_password <password> -sasl_mechanism PLAIN freenode
/server add -auto -net freenode -ssl -ssl_verify chat.freenode.net 6697
/save