Skip to content

Instantly share code, notes, and snippets.

@ivanov
ivanov / git-recent
Created September 5, 2013 02:49
prints the recent heads from a remote
#!/bin/bash
# git-recent: prints the recent heads from a remote
#
# Usage:
#
# git recent # recent branches in this repo
# git recent remote_name # recent branches in remote_name
#
# git-recent was written by Paul Ivanov. Please send improvements to @ivanov on
# GitHub/Twitter, or find my email address.
@ivanov
ivanov / example.aux
Last active December 20, 2015 19:19 — forked from astrofrog/example.ipynb
\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand\zref@newlabel[2]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldcontentsline\contentsline
\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ivanov
ivanov / dispair
Created July 1, 2013 16:15
a fortune file of dispair.com maxims
SHOOT FOR THE MOON Even if you miss, you'll land among the
stars. Of course, then your eyeballs will boil and your
lungs explode from decompression. But that's what you get
for being a damn showoff.
%
LOVE Money can't buy you love. But it can buy exotic cars
and luxury yachts. Once you've got those covered, you'll be
fighting love off with a stick.
%
SURVIVAL Keep your friends close, but your enemies closer.
@ivanov
ivanov / aperture.py
Created April 23, 2013 00:13
aperture labs ipython startup banner
"""
,=:;//;:-,.
,;%+,./H#M@MM@@@H: .
,/X@MMMH%-,=%MM@M@@M+ +X/,
-+@MMMM@MMMMX;,-+HM@@M$ ;MM@+-
./@#M@M@HHHXXXXX+- .;X@MX -M@@M@;
.,=:=-=---. =%@, HM@@MM%,
;+%%%$$XH%- ,. XM@@@#@=
:MM@MMMM@;. $M@M@/.-=
$M@@@MM+. /MM$- /@X
@ivanov
ivanov / mpl_gradient_hack.py
Created April 22, 2013 23:21
gradient lines in matplotlib
#!/usr/bin/env python
"""A quick hack to draw gradient lines using a colormap.
This was written in response to <Baribal>'s question on IRC.
There are two functions provided here:
`plot_gradient_hack` takes two arguments, p0 and p1, which are both (x,y)
pairs, and plots a gradient between them that spans the full colormap.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ivanov
ivanov / unicode.py
Created March 25, 2011 02:45 — forked from minrk/unicode.py
#!/usr/bin/env python
# -*- encoding: utf-8
#from IPython.external
import sys
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
paa = parser.add_argument
"my fugly .vimrc, as demanded by Justin and Matt at SciPy2010 -pi
set tw=0
set tabstop=4
set shiftwidth=4
set softtabstop=4
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12
"allows inline settings at the beginning/end of file (e.g. :ai:ts=4:)
set modeline
"convert tabs to spaces
set expandtab