Skip to content

Instantly share code, notes, and snippets.

View ameintjes's full-sized avatar

Ayton Meintjes ameintjes

View GitHub Profile
@sbamin
sbamin / sracmd
Last active December 5, 2022 15:35
Interact with NCBI SRA using aspera ascp command line client
#!/bin/bash
## Wrapper to interact with NCBI SRA using aspera ascp command line interface
## v 2.5 | 04/2017
## @sbamin
# More info: http://download.asperasoft.com/download/docs/ascp/2.7/html/
# usage
show_help() {
@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 November 21, 2025 07:53
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 August 18, 2025 18:20
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