Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

replace black colour to one new colour
mogrify -path "target/path/" +level-colors lightgray "source/path/*.png"
replace black and white image with new "color" (note the comma)
mogrify -path "target/path/" +level-colors lightgray, "source/path/*.png"
@granbom
granbom / citrix receiver add more certs
Created February 10, 2018 14:24
If An SSL connection to the server couldn't be established...
# It's most likely because Citrix Receiver only include a few root certs
# and the server you are connecting to is not using one of these.
# To map more root certs to Citrix Receiver in Ubuntu do this:
sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts/
sudo c_rehash /opt/Citrix/ICAClient/keystore/cacerts/
/etc/sudoers.d/90-init-users
pg ALL=(ALL) NOPASSWD:ALL
sudo apt install build-essential
sudo apt install git
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
* ruby and gem
https://github.com/rvm/ubuntu_rvm
@granbom
granbom / default-win10.reg
Last active October 16, 2020 19:06
Solarized console on Windows 10 WSL
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:000c0c0c
"ColorTable01"=dword:00da3700
"ColorTable02"=dword:000ea113
"ColorTable03"=dword:00dd963a
"ColorTable04"=dword:001f0fc5
"ColorTable05"=dword:00981788
"ColorTable06"=dword:00009cc1
@granbom
granbom / ffmpeg
Last active October 29, 2019 12:11
# to=timestamp
ffmpeg -i input -ss 00:01:00 -to 00:02:00 output
# t=duration
ffmpeg -i input -ss 00:01:00 -t 00:02:00 output
# concat
ffmpeg -i "concat:input1.ts|input2.ts|input3.ts" -c copy output.ts
# convert all files in dir from srt to vtt
@granbom
granbom / certbot
Last active June 14, 2018 02:47
certbot
certbot certonly --webroot -w /var/www/example/ -d www.example.com -d example.com
certbot certonly --webroot -w /var/www/example/ -d example.com -d www.example.com --post-hook="service nginx reload"
certbot certificates
# windows
certbot certonly --manual --preferred-challenges http -d example.com -d www.example.com
openssl pkcs12 -inkey privkey.pem -in cert.pem -in fullchain.pem -export -out example.pfx
run
control /name Microsoft.DefaultPrograms /page pageFileAssoc
@granbom
granbom / openssl IMAP connect
Created March 6, 2018 02:39
IMAP test with openssl
openssl s_client -crlf -connect example.com:993
tag login user@example.com password
tag LIST "" "*"
tag SELECT INBOX
tag STATUS INBOX (MESSAGES)
tag FETCH x:y (BODY[HEADER])
tag FETCH y (BODY)
tag FETCH y (BODY[n])
tag LOGOUT
@granbom
granbom / shutdown
Created February 5, 2018 19:19
Shutdown Win 10 for real
C:\Windows\System32\shutdown.exe /s /t 0