Skip to content

Instantly share code, notes, and snippets.

View ihordiachenko's full-sized avatar

Ihor Diachenko ihordiachenko

View GitHub Profile
@ihordiachenko
ihordiachenko / check_ignore.sh
Created October 25, 2017 14:55
Check if a given file is ignored by git
git check-ignore -v foo/bar.sh
@ihordiachenko
ihordiachenko / undo_rebase.sh
Created July 29, 2017 15:14
Undo the git rebase
git rebase --onto master server client
@ihordiachenko
ihordiachenko / get_table_creation_script.sh
Created July 15, 2017 14:24
Get the PostgreSQL table creation script
pg_dump -U $USER $DB -t $TABLE --schema-only
@ihordiachenko
ihordiachenko / netstat_mac.sh
Last active July 4, 2017 14:02
OS X `netstat -tupln` alternative
sudo lsof -i -n -P
@ihordiachenko
ihordiachenko / ssh_proxy.sh
Last active July 4, 2017 14:03
SSH Proxy
ssh -fN [email protected] -L 7777:myserver.com:8888
@ihordiachenko
ihordiachenko / pem_to_pfx.sh
Last active July 4, 2017 14:00
Convert PEM certificate to PFX
openssl pkcs12 -export -out hufsy.pfx -inkey hufsy_com.key -in hufsy_com.crt
@ihordiachenko
ihordiachenko / fix_local.sh
Created June 8, 2016 15:38
Fix locale on Ubuntu
sudo sh -c "printf '%s\n' \
'LANGUAGE=en_US.UTF-8' \
'LC_ALL=en_US.UTF-8' \
'LANG=en_US.UTF-8' \
'LC_TYPE=en_US.UTF-8' \
> /etc/default/locale"
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
#reboot