Skip to content

Instantly share code, notes, and snippets.

Sarah Mount snim2

Block or report user

Report or block snim2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View inotify-make.sh
#!/bin/sh
#
# This script automatically runs 'make' whenever any of the LaTeX files in
# this directory are saved. Open the PDF file you want to view in the
# background, and run this script in the shell. Every time you save a
# LaTeX file, the LaTeX will be recompiled and an updated version of the PDF
# will be displayed in your PDF viewer.
#
View stat.md

stat.h

Based on: sys/stat.h

Field Size Offset Note
ST_DEV 2 0 dev_t is a u short
ST_INO 2 2 ino_t is a u short
ST_MODE 4 4 mode_t is a u int
@snim2
snim2 / err.sh
Created Jun 18, 2015
py.test error
View err.sh
$ py.test --version
This is pytest version 2.6.3, imported from /usr/lib/python2.7/dist-packages/pytest.pyc
snim2:2073(0):pydgin$ pip install --user -r requirements.txt
Downloading/unpacking pytest-cov (from -r requirements.txt (line 1))
Downloading pytest-cov-1.8.1.tar.gz
Running setup.py (path:/tmp/pip-build-ND85Ym/pytest-cov/setup.py) egg_info for package pytest-cov
Downloading/unpacking pytest-xdist (from -r requirements.txt (line 2))
Downloading pytest-xdist-1.12.tar.gz
View gist:7e41f7511982e471fc3b
### Keybase proof
I hereby claim:
* I am snim2 on github.
* I am snim2 (https://keybase.io/snim2) on keybase.
* I have a public key whose fingerprint is 194B B3F0 4F1A 6987 24D6 ACED 46D2 1328 8DF5 C798
To claim this, I am signing this object:
@snim2
snim2 / screenie-howto.md
Created Feb 22, 2015
Instructions on how to create an animated git of a shell session
View screenie-howto.md

How to produce an animated gif

Step 1: Record a terminal session

$ ttyrec myrecording.tty

Press Ctrl+d when finished.

@snim2
snim2 / interp.py
Last active Aug 29, 2015
Pylab interpolation example
View interp.py
{
"metadata": {
"name": "Heatmap example"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@snim2
snim2 / keywords.tex
Created Aug 25, 2014
Example LaTeX listings with mixed alphanumeric keywords
View keywords.tex
\documentclass[12pt]{article}
\usepackage{xcolor}
\usepackage{listings}
\renewcommand{\ttdefault}{pcr}
\definecolor{Black}{gray}{0.0}
\definecolor{Blue}{rgb}{0.12,0.29,0.53}
@snim2
snim2 / tocloft_example
Last active Aug 29, 2015
An example use of tocloft and IEEE format
View tocloft_example
%
% http://tex.stackexchange.com/questions/197369/how-to-use-tocloft-to-create-a-list-which-appears-in-the-middle-of-the-document
%
% http://tex.stackexchange.com/questions/198326/tocloft-cross-references-a-section-as-a-subsection
%
\documentclass[conference]{IEEEtran}
\usepackage{etoolbox}
\usepackage{lipsum}
\usepackage[titles]{tocloft}
View gist:4af7b12076a31b13190c
$ export PYTHONPATH=$PYTHONPATH:/opt/pypy:. ; py.test -v tests/compiler/_*.py -k test_ast_functionstatement -s
======================================================== test session starts =========================================================
platform linux2 -- Python 2.7.6 -- pytest-2.2.4.dev2 -- /usr/bin/python
collecting 0 items[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-default-16/platcheck_0.c -o /tmp/usession-default-16/platcheck_0.o
[platform:execute] gcc /tmp/usession-default-16/platcheck_0.o -pthread -lintl -lrt -o /tmp/usession-default-16/platcheck_0
collecting 23 items/home/snim2/Desktop/working/snim2/naulang/naulang/compiler/parser.py:317: ParserGeneratorWarning: 48 shift/reduce conflicts
PARSER = pg.build()
collected 110 items
tests/compiler/test_ast.py:137: test_ast_functionstatement PASSED
View HOWTO.md

Creating the post-commit file

Note: If you want to use your personal Twitter account to post commits, go to Step 2

  1. Create a new Twitter account for your commit messages. Example
  2. Go to http://dev.twitter.com and Sign In with your Twitter account you are posting commit messages to.
  3. Hover over your username in the top-right corner after signing in and select "My Applications"
  4. Create a new application
  5. The name, description, and site can all be whatever you want, but leave Callback URL empty
  6. Under "Application Settings" click "modify app permissions" next to "Access level"
You can’t perform that action at this time.