Skip to content

Instantly share code, notes, and snippets.

@Zulko
Zulko / limehouse_nights_moviepy.py
Last active September 14, 2017 20:37
Source for my music video on Gershwin's Limehouse Nights
"""
Code for a music video where sheet music is
scrolled transparently on my hands playing the
piano. See that effect here:
https://www.youtube.com/watch?v=V2XCJNZjm4w
"""
from moviepy.editor import *
@mwhite
mwhite / git-aliases.md
Last active May 31, 2024 23:55
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@simonjbeaumont
simonjbeaumont / tmup
Last active October 13, 2021 11:03
Update bash to latest tmux environment on reattaching.
#!/bin/bash
tmup ()
{
echo -n "Updating to latest tmux environment...";
export IFS=",";
for line in $(tmux showenv -t $(tmux display -p "#S") | tr "\n" ",");
do
if [[ $line == -* ]]; then
unset $(echo $line | cut -c2-);
@genegoykhman
genegoykhman / qb2ledger
Created September 22, 2012 04:19
Converts a QuickBooks General Journal CSV export to a ledger_cli compatible transaction file. More details at http://www.timetiger.com/gene/blog/2012/2012-09-23-an-alternative-to-quickbooks.html
#! /usr/bin/env ruby
require 'csv'
require 'Date'
require 'optparse'
SCRIPT_VERSION = [1, 0, 0]
class Transaction
attr_accessor :transaction_id, :type, :date, :num, :rows
def initialize
@threedaymonk
threedaymonk / mandel.clj
Created September 11, 2012 20:32
UTF-8 Mandelbrot in Clojure
(def screen-width 100)
(def screen-height 30)
(defn scaled-x [x]
(- (* (/ x screen-width) 3.5) 2.5))
(defn scaled-y [y]
(- (* (/ y screen-height) 2) 1))
(defn mandel [x y iteration x0 y0 max-iteration]
@mashdot
mashdot / msmtprc
Created May 6, 2012 14:27
mutt + offlineimap + msmtp +msmtpQ
#Time-stamp: <2012-05-06 Sun 16:07 msmtprc>
# This file must have no more than user read/write permissions.
account work
host mail.work.net
user someone.something@work.net
password password
auto_from off
from someone.something@work.net
maildomain work.net
@huyng
huyng / matplotlibrc
Created February 8, 2011 15:50
my default matplotlib settings
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).