Skip to content

Instantly share code, notes, and snippets.

View ordovician's full-sized avatar

Erik Engheim ordovician

View GitHub Profile
@ordovician
ordovician / EquivalenceRelations.jl
Last active January 2, 2016 20:29
Equivalence Relations in modulo aritmetic.
mod(A, C) == r
# then
mod(A + k*C, C) == r
# so if
mod(A, C) == mod(B, C)
@ordovician
ordovician / git-change-history.rb
Created November 5, 2012 19:24
Change git history without modifying the tree blobs pointed to by commits
#! /usr/bin/env ruby
if ARGV.empty?
puts "Usage: git-change-history base [new-branch-name]"
puts " a list of SHA-1 for commits are given on STDIN. These are commits are added onto base"
puts "Example:"
puts " git log --pretty=\"%H\" master | git-change-history.rb base mynewbranch"
puts ""
puts "Use 'git log --pretty=\"%H %s\"' to test if you have the right SHA-1 commit hashes listed"
exit