Skip to content

Instantly share code, notes, and snippets.

@smoh
smoh / README.md
Created October 13, 2016 17:59 — forked from weiglemc/.block
D3 Scatterplot Example
@smoh
smoh / .bashrc
Last active August 30, 2015 23:32 — forked from mt3o/.bashrc
Bash prompt
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
#!/bin/sh
# This script will install a Git pre-push hook that prevents force pushing the master branch.
# Install in current Git repo:
# curl -fL https://gist.githubusercontent.com/smoh/53e32f3bcf8dc14f8696/raw/install-pre-push.sh | sh
# Uninstall:
# rm .git/hooks/pre-push
# in each repository that you've added this to.
GITROOT=`git rev-parse --show-toplevel 2> /dev/null`
{%- extends 'full.tpl' -%}
{% block input_group -%}
<div class="input_hidden">
{{ super() }}
</div>
{% endblock input_group %}
{%- block header -%}
{{ super() }}
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.
@smoh
smoh / _readme.md
Created September 29, 2013 03:24 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

Save yourself some time and run this little fellow!

Prerequisities

  • gcc
  • wget
import os
import tempfile
from mpi4py import MPI
comm = MPI.COMM_WORLD
size = comm.Get_size()
rank = comm.Get_rank()
mode = MPI.MODE_RDONLY
@smoh
smoh / gist:6745537
Created September 28, 2013 19:22 — forked from rmcgibbo/gist:4693441
#!/bin/sh
# probably need to set up some PBS directives up here...
N_PROCS=4
# Set up a little python "shim" using mpi4py that farms
# out a set of command line commands to multiple nodes
# using MPI. This shim gets written to a little file
rm -f ./temp_shim.py