Skip to content

Instantly share code, notes, and snippets.

Youri op 't Roodt optroodt

Block or report user

Report or block optroodt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
optroodt /
Created Nov 15, 2019
Generate 1000 text files with random words
import pathlib
import random
dictionary = pathlib.Path("/usr/share/dict/web2") # It's there on MacOS
words = set()
with"r") as f:
for l in f:
optroodt /
Created Aug 5, 2019
Start (i)pdb on exception
python -m pdb -c continue
View gist:b1bb3b3d1edbcefb31f3c621abd7065c
# uninstall packages installed by pip
pip freeze | xargs pip uninstall -y
# see which packages depend on a package:
pip show <insert_package_name_here>| grep ^Require
optroodt / sublime-keymap.json
Created Mar 27, 2018
OS X Eclipse key bindings for Sublime Text 3
View sublime-keymap.json
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["super+alt+down"], "command": "duplicate_line" },
{ "keys": ["super+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },

How to get BennVenn' joey-joebags working on macOS

The joey-joebags is a Game Boy cart reader/writer, it's available here.

I have tested these steps on Yosemite (10.10) and Sierra (10.12). You need to have Python 3, which is not installed by default, so install using Homebrew.

Install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL"

optroodt / gist:8298148
Created Jan 7, 2014
Extract single table from mysql dump file.
View gist:8298148
sed -n -e '/CREATE TABLE.*tablename/,/CREATE TABLE/p' database.sql > table.sql
You can’t perform that action at this time.