Skip to content

Instantly share code, notes, and snippets.

View giannisp's full-sized avatar

Ioannis Poulakas giannisp

View GitHub Profile
@giannisp
giannisp / gist:330a7977e880f3496519f925b4dea3ea
Created January 2, 2017 10:40
Quicktime mov screencast to gif
brew install ffmpeg
brew install gifsicle
ffmpeg -i screencast.mov -s 600x120 -pix_fmt rgb24 -r 30 -f gif - | gifsicle --optimize=3 --delay=3 > screencast.gif
brew install imagemagick
convert icon.png favicon.ico
@giannisp
giannisp / gist:f088e793c7361cdac849dd48cbdd66fe
Created January 14, 2017 18:53
List Atom installed packages
apm list --installed --bare
@giannisp
giannisp / gist:798c2c34a3f8df0f249af28500236c4d
Created February 8, 2017 07:37
Verify that an SSL certificate and key are matching
# md5 sums should match
openssl x509 -noout -modulus -in server.crt| openssl md5
openssl rsa -noout -modulus -in server.key| openssl md5
@giannisp
giannisp / gist:293693c3234216913e61531ea871905a
Last active March 3, 2017 07:00
Convert docx to markdown
# Pandoc has to be installed (http://pandoc.org/)
# on OS X it can be easily installed via brew
brew install pandoc
pandoc -s file.docx -t markdown -o file.md
@giannisp
giannisp / gist:bf7007dc741ba6a10a9dd084ed4af6de
Created April 12, 2017 07:09
List global NPM installed packages
npm ls -g --depth 0
@giannisp
giannisp / hsts-delete-domain
Last active April 24, 2017 05:38
Automate HSTS domain delete action on Chrome (macOS)
#!/usr/bin/env osascript -l JavaScript
function run(domain) {
const Chrome = Application('Google Chrome');
Chrome.activate();
const window = Chrome.windows[0];
const tab = Chrome.Tab({
url: 'chrome://net-internals/#hsts',
});
@giannisp
giannisp / gist:f0f3f45e6ecdfe904f33f334695bd160
Created April 24, 2017 16:05
Produce a cross-browser compatible video for using on a video tag
ffmpeg -i source.mp4 -vcodec libx264 -pix_fmt yuv420p target.mp4
@giannisp
giannisp / gist:5a488a793ed3a3dbabe689fea5ee65ae
Created January 24, 2018 08:13
Disable ApplePressAndHoldEnabled for VS Code
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
@giannisp
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'