Skip to content

Instantly share code, notes, and snippets.

View giannisp's full-sized avatar

Ioannis Poulakas giannisp

View GitHub Profile
giannisp / gist:fb7ed841e702dc3dc58b7f1a933642e6
Created September 25, 2018 07:20
Fix for thin fonts on macOS Mojave (10.14)
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
giannisp / gist:2ce8cc5998254815408fbe1549cd2c85
Created July 23, 2018 06:06
Disable docker container auto-restart
docker update --restart=no container
giannisp / gist:3053a020d1e1f4054ca1001e53238928
Created June 26, 2018 17:11
Parse iana timezone names using jq
cat 2018e.json | jq '{ version: .version, zones: [.zones[].name] }' > timezones.json
giannisp / gist:daa5150ae1a1ae6c829ffc84b230b82f
Created April 23, 2018 14:15
Update time/date on macOS
sudo ntpdate -u
giannisp / gist:014ab4a30a1c968f599f81d86bc4909a
Created April 15, 2018 14:46
Extract EXIF image data with ImageMagick
identify -format '%[EXIF:*]' image.jpg
giannisp / gist:12bf8b6f04da064a1cafdfc570155624
Created April 2, 2018 14:24
Fetch SSL certificate info from the CLI
openssl s_client -showcerts -connect
giannisp / gist:45ab01577cefc8113b43ef186b903388
Created March 18, 2018 09:56
7z encryption (AES256 + encrypted filenames)
7z a file.7z file.txt -mhe=on -p1234
giannisp / gist:5a488a793ed3a3dbabe689fea5ee65ae
Created January 24, 2018 08:13
Disable ApplePressAndHoldEnabled for VS Code
defaults write ApplePressAndHoldEnabled -bool false
giannisp / gist:1ed3665af198f62271712569e14ac808
Created October 20, 2017 18:10
Ubuntu 17.10 - Move window buttons to the left
# Move to the left
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,maximize,minimize:'
# Move to the right
gsettings set org.gnome.desktop.wm.preferences button-layout ':close,maximize,minimize'
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active March 1, 2024 14:39
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql