Skip to content

Instantly share code, notes, and snippets.

View dnmiller's full-sized avatar

Dan Miller dnmiller

View GitHub Profile
@dnmiller
dnmiller / gist:5543623
Created May 8, 2013 21:01
Installation instructions for Panda3D on OS X that has newish XCode (in progress)
Building Panda3D from source on newish OS X.
1. Install the following homebrew formlae:
- python
- nspr
- vrpn (optional, for joysticks/etc.)
- libjpeg, libtiff
- fftw
# Apt-install various things necessary for Ruby, guest additions,
# etc., and remove optional things to trim down the machine.
apt-get -y update
apt-get -y remove apparmor
apt-get -y install linux-headers-$(uname -r) build-essential
apt-get -y install zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev libssl-dev openssl libreadline5-dev
apt-get clean
# Remove this file to avoid dhclient issues with networking
rm -f /etc/udev/rules.d/70-persistent-net.rules
@dnmiller
dnmiller / nfl.py
Last active December 10, 2015 14:29
import csv
from collections import namedtuple
from datetime import timedelta
team = lambda *x: dict(zip(('City', 'Mascot', 'Division'), x))
teams = {
'BUF': team('Buffalo', 'Bills', 'AFC East'),
'MIA': team('Miami', 'Dolphins', 'AFC East'),
'NE': team('New England', 'Patriots', 'AFC East'),
'NYJ': team('New York', 'Jets', 'AFC East'),
@dnmiller
dnmiller / ltitr_test.jl
Created October 27, 2012 04:25
Matlab's ltitr vs. Julia
# Test for ltitr implemented in Julia. I get about 45 ms.
function ltitr(A, B, U)
N = size(U, 2)
X = zeros(size(A, 1), N)
for i = 2:N
X[:, i] = A*X[:, i-1] + B*U[:, i-1]
end
return X
end
@dnmiller
dnmiller / note_template.tex
Created October 16, 2012 06:31
LaTeX Template for Math Notes
\documentclass{tufte-handout}
\usepackage{amsmath}
% Set up the images/graphics package
\usepackage{graphicx}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\graphicspath{{figures/}}
\title{TITLE}
\author{AUTHOR}
" .---.
" / . \
" |\_/| |
" | | /|
" .----------------------------------------------------------------' |
" / .-. |
" | / \ |
" | |\_. | |
" |\| | /| MY .vimrc - Last updated whenever |
" | `---' | |
@dnmiller
dnmiller / .zshrc
Created October 2, 2012 04:59
zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Pre-loaded theme
ZSH_THEME="agnoster"
# (Will change per machine)
DEFAULT_USER="danmiller"
# Dots are pretty.