Skip to content

Instantly share code, notes, and snippets.

View kazimuth's full-sized avatar
🕷️
numbers aren't real

james gilles kazimuth

🕷️
numbers aren't real
  • Detroit, MI
View GitHub Profile
@kazimuth
kazimuth / test.sh
Created July 29, 2015 22:32
Shell incompatibilities
#!/bin/sh
A="HI!" B="$(sh -c 'echo $A')" sh -c 'echo $A $B'
# $ bash test.sh
# HI! HI!
# $ dash test.sh
# HI!

Let's talk about how git works. There are lots of tutorials explaining how to use git, and they're all great; this is just trying to give you an intuition as to why it works the way it does.

There are lots of 'version control systems', and they're all different. I'm using git here for two reasons: 1, it's ubiquitous right now; and 2, I understand it pretty well. No value judgement of any other tool.

(Everything here is true for a given value of true. It's true enough to use; if you need to know deeper specifics, check out the git tutorial site, which is wonderful.)

So, what is git?

Let's say you've worked in a group on some sort of computer-based project before. You have a folder full of (vital) files:

@kazimuth
kazimuth / cruftmas.py
Last active November 8, 2015 03:30
Cruftmas
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import smtplib
import string
import csv
import random
import itertools as it
from datetime import datetime
@kazimuth
kazimuth / gist:f95cb2fea54a2aa912ee
Created January 5, 2016 04:52
Verifier fragment
<target name="verify">
<java classpathref="classpath.run" fork="yes" classname="battlecode.instrumenter.Verifier">
<assertions>
<enable/>
</assertions>
<arg line="team28"/>
</java>
</target>
@kazimuth
kazimuth / lgconfig.sh
Last active May 25, 2019 07:48
git lg
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@kazimuth
kazimuth / pubkey.asc
Created July 17, 2016 23:26
pubkey.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFeMAIwBEAC31CQf0r60i3Ox67wTanvKN4sNZ9ghy1bVDdFl7Ia367l2sE9B
O1uoCczgLGxI/DQrUXBsImz23DEknR7CW8onjkZ+ji0nsOxDFoT9lcTQRkXPfdR3
S/TCbSDEim4f61FbtiCbVEl1ohxu/eM+PeLNarkv/3aFgCiKaedyMQow9X9ygxyR
WqvCu3IhFOBUIt0PxUYp5MN+cvSvm7wmPKM0E2M/Bk4Y5j1ko+ZhgVMcswmRjAv7
8vQaj80gYwWOJKi4o3onjg5g5S1PF10YItvx3fXcbtoQREmacZ48djUyjERkww0k
5XBYOwDVdJNlNVPjgGGRWLSF0Zn1a/XRpkdw9iYWZhLlwL9nP6BPkT7KcqYYQs7a
rBbtVsAJGScC1NdEiXaQRPKCZGsaF6NcQ7KcO/HGeqFpjh+88/mYivOeitcy2uz0
CQOTQO RFDIFD UNSUFJYEDQB MZQQ TQCQWU KWTR QIJUHEYTI
WJVZNWJ YCCUTYQJU FXXNXYFSHJ IUDTYDW FAJWFLJ TUSYCQB
UTXNYNTSX VHEC XTQ EVVIUJ KTW WKYTQDSU XDXYJR UQSX
UTXNYNTS UDSHOFJUT GD IKRJHQSJYDW YBT
3 1.439
6 0.772
5 0.362
1 1.476
3 3.235
@kazimuth
kazimuth / README.md
Created October 25, 2016 06:23
Cruftmas

This python2 program reads in a csv of kerberoses (i.e. from Google Docs), creates a gift-giving chain, and sends cruftmas emails. The CSV should include column headings (i.e. Kerberos, Time, etc.) so that you can choose the correct heading. It asks for your athena password so that it can log into the MIT SMTP server and send the emails; it can also dump a list of assignments for you to send yourself.

@kazimuth
kazimuth / lib.rs
Created January 16, 2017 00:01
peg issue
#![feature(plugin)]
#![plugin(peg_syntax_ext)]
extern crate peg;
#[derive(Debug, PartialEq, PartialOrd)]
pub enum NumericConstant {
U64(u64),
I64(i64),
F64(f64),
#!/bin/sh
echo "don't run this"
exit 1
git init
mv .git git
ln -s git .git
while true
do