git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#include <X11/Xlib.h> | |
#include <iostream> | |
#include <unistd.h> | |
int main(void) { | |
Display* dpy = XOpenDisplay(0); | |
int scr = XDefaultScreen(dpy); | |
Window root_window = XRootWindow(dpy, scr); | |
int height = DisplayHeight(dpy, scr); |
See http://stackoverflow.com/questions/7773181/git-keeps-prompting-me-for-password
Make sure you are cloning your repos using ssh
:
ssh://[email protected]/username/repo.git
If you use https
or git
, you will always be asked for username/password:
https://github.com/username/repo.git
git://github.com/username/repo.git
import os | |
def compare_dir_layout(dir1, dir2): | |
def _compare_dir_layout(dir1, dir2): | |
for (dirpath, dirnames, filenames) in os.walk(dir1): | |
for filename in filenames: | |
relative_path = dirpath.replace(dir1, "") | |
if os.path.exists( dir2 + relative_path + '\\' + filename) == False: | |
print relative_path, filename | |
return |
rsync (Everyone seems to like -z, but it is much slower for me)
############################################################################################## | |
##Running fsl from the command line | |
##some commands that I find useful | |
## | |
############################################################################################## | |
############################################################################################## | |
############################################################################################## | |
##Using the fslmaths and fslstats toolboxes | |
############################################################################################## |
#!/bin/sh | |
allpdfs="" | |
for f in "$@" ; do | |
filename=$(basename "$f") | |
filename="${filename%.*}" | |
pygmentize -f tex -O linenos -O title=$( echo $filename | tr '_' '-').py -O full -O style=default -o /tmp/$filename.tex $f | |
pdflatex -jobname=$filename -output-directory=/tmp /tmp/$filename.tex | |
allpdfs="$allpdfs /tmp/$filename.pdf" |
#!/bin/csh | |
# Get the name of this script | |
if ( $?_ ) then | |
# With tcsh the name of the file being sourced is available in | |
# $_. | |
set script_name = `basename $_` | |
else | |
# Fall back to $0 which, sometimes, will be the name of the |
""" | |
A simple FiveThirtyEight palette for Seaborn plots. | |
""" | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
five_thirty_eight = [ | |
"#30a2da", | |
"#fc4f30", |
# Install QEMU OSX port with ARM support | |
sudo port install qemu +target_arm | |
export QEMU=$(which qemu-system-arm) | |
# Dowload kernel and export location | |
curl -OL \ | |
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie | |
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie | |
# Download filesystem and export location |