Skip to content

Instantly share code, notes, and snippets.

View ameintjes's full-sized avatar

Ayton Meintjes ameintjes

  • University of Cape Town
  • Cape Town, South Africa
View GitHub Profile
@mattvonrocketstein
mattvonrocketstein / README.md
Last active August 21, 2019 16:21
neo4j setup with vagrant/ansible

Clone this gist into the working directory

git clone [email protected]:96670d2eb66a8ad9854b6f52a2b5339c.git vagrant-ansible-neo
cd vagrant-ansible-neo

Install the neo4j role into the working directory

ansible-galaxy install julienroubieu.neo4j -p .

Bring up the vagrant box

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@pbugnion
pbugnion / ipython_notebook_in_git.md
Last active October 22, 2023 12:25
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active April 19, 2025 07:41
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@idan
idan / gist:c27b2dd45a78273af848
Created October 8, 2014 13:13
Exploding Postgres HSTORE columns in Pandas
def explode_hstore(df, column):
"""Explode a column of a dataframe containing PostgreSQL hstore k-v pairs in the format of:
"foo"=>"bar", "baz"=>"quux", ...
Every key becomes a column. If a given row's pairs doesn't have a key, then the resulting column's value
will contain NaN.
"""
# split the tags column out as a new series, and break up each k=>v pair
s = df[column].str.split(', ').apply(pd.Series, 1).stack()
@BlakeGardner
BlakeGardner / install nano.sh
Last active April 19, 2025 22:25
Syntax highlighting in nano on Mac OS
# Last updated May, 2024 for Apple silicon Macs
# Install Homebrew if you don't already have it: https://brew.sh
# install nano from homebrew
brew install nano nanorc
# update your nanorc file
echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting