Skip to content

Instantly share code, notes, and snippets.

View hatemzidi's full-sized avatar
🐼
Working from home

hatem zidi hatemzidi

🐼
Working from home
View GitHub Profile
@hatemzidi
hatemzidi / Preferences.sublime-settings
Last active September 2, 2015 20:07
My Sublime Text 3's user preferences
{
"bold_folder_labels": true,
"caret_style": "phase",
"draw_indent_guides": false,
"enable_tab_scrolling": false,
"fade_fold_buttons": false,
"gutter": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@hatemzidi
hatemzidi / idea.vmoptions
Created September 2, 2015 20:52
Tunning IntelliJ VM options for better performance on MacOS X
-ea
-server
-Xms512m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:MaxMetaspaceSize=512m
-XX:ReservedCodeCacheSize=256m
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+UseCodeCacheFlushing
git filter-branch --env-filter '
WRONG_EMAIL="[email protected]"
NEW_NAME="YOUR NAME"
NEW_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
# Remove all stopped containers
# Remove all volumes not used by at least one container
# Remove all networks not used by at least one container
# Remove all dangling images
# https://docs.docker.com/engine/reference/commandline/system_prune/#usage
docker system prune
# Remove leftover containers
docker ps -a -f status=exited -q | xargs -r docker rm
# https://unix.stackexchange.com/a/487546
openssl s_client -showcerts -verify 5 -connect $HOST:$PORT < /dev/null | awk '/BEGIN/,/END/{ if(/BEGIN/){a++}; out="cert"a".crt"; print >out}' && for cert in *.crt; do newname=$(openssl x509 -noout -subject -in $cert | sed -n 's/^.*CN=\(.*\)$/\1/; s/[ ,.*]/_/g; s/__/_/g; s/^_//g;p').pem; mv $cert $newname; done