Skip to content

Instantly share code, notes, and snippets.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@dtao
dtao / example.sublime-keymap
Last active December 19, 2017 22:58
Sublime Text plugin to replace selected text with random letters/numbers
[
{ "keys": ["ctrl+alt+r"], "command": "randomize" }
]
@bwhite
bwhite / rank_metrics.py
Created September 15, 2012 03:23
Ranking Metrics
"""Information Retrieval metrics
Useful Resources:
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt
http://www.nii.ac.jp/TechReports/05-014E.pdf
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf
Learning to Rank for Information Retrieval (Tie-Yan Liu)
"""
import numpy as np
@imkevinxu
imkevinxu / .gitconfig
Created November 5, 2012 09:42
`git random` alias that will commit a random commit message from http://whatthecommit.com/
[alias]
random = !"git add -A; git commit -am \"$(echo $(curl -s http://whatthecommit.com/index.txt)\" (http://whatthecommit.com)\")\"; git pull --rebase; git push"
@igrigorik
igrigorik / adb_trace.py
Last active October 11, 2022 10:19
ADB script for remote chrome://tracing debugging!
#!/usr/bin/python
import subprocess
import re
import os
import sys
import optparse
import time
def call_checked(*args):
r = subprocess.call(args)
@jmcguirk
jmcguirk / PerformBuild.cs
Created March 8, 2013 01:56
Unity3D Ant Build Configuration
// C# example
using UnityEditor;
using System.IO;
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
class PerformBuild
{
static string[] GetBuildScenes()
@yanofsky
yanofsky / LICENSE
Last active August 30, 2025 02:53
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@rossant
rossant / raytracing.py
Last active August 15, 2025 21:37
Very simple ray tracing engine in (almost) pure Python. Depends on NumPy and Matplotlib. Diffuse and specular lighting, simple shadows, reflections, no refraction. Purely sequential algorithm, slow execution.
"""
MIT License
Copyright (c) 2017 Cyrille Rossant
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@ZeronSix
ZeronSix / gist:7772309
Last active September 9, 2024 09:56
Simple Unity3D TMX parser.
using UnityEngine;
using UnityEditor;
using System;
using System.Xml.Linq;
using System.Collections.Generic;
public enum MapType {
Isometric,
Orthogonal
}
@phiggins
phiggins / gist:8681048
Created January 29, 2014 03:04
Nand2Tetris from the commandline
pete@balloon:~/projects/nand2tetris/phiggins/01$ pwd
/home/pete/projects/nand2tetris/phiggins/01
pete@balloon:~/projects/nand2tetris/phiggins/01$ ../../tools/HardwareSimulator.sh ~/projects/nand2tetris/phiggins/01/Mux4Way16.tst
End of script - Comparison ended successfully
pete@balloon:~/projects/nand2tetris/phiggins/01$