git cat-file commit master | awk '/^parent.*/{print $0}; //{print $0}' | git hash-object --stdin -w -t commit | xargs git checkout -B master
Here it is:
$> git show --stat
commit 52eb56f6d5816f9e43015878e60a41cbbfb3e702
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'git' | |
require 'fileutils' | |
# Directory that suppose to be in $PATH | |
bin_dir = File.join(Dir.home, 'bin') | |
smackage_dir = File.join(Dir.home, 'projects/smackage') |
exception NoAnswer | |
val only_capitals = List.filter (fn s => Char.isUpper (String.sub (s,0))) | |
val longest_string1 = foldl (fn (s,m) => if String.size s > String.size m then s else m) "" | |
val longest_string2 = foldl (fn (s,m) => if String.size s >= String.size m then s else m) "" | |
fun longest_string_helper p = foldl (fn (s,m) => if (p (String.size s) (String.size m)) then s else m) "" |
#!/bin/bash | |
set -e | |
########################## | |
# INSTALL GHC | |
########################## | |
GHC="ghc.tar.bz2" | |
# install depends | |
sudo apt-get install --assume-yes libgmp3c2 |
#!/usr/bin/env ruby | |
require 'gnuplot' | |
require 'ostruct' | |
def read file | |
times = [] | |
File.open(file).each do |line| | |
_,a,_ = line.split(' ') | |
times << Float(a)/1000000 |
def get_hostid_by_itemid(itemid) | |
message = { | |
'method' => 'host.get', | |
'params' => { | |
'itemids' => [itemid.to_s] | |
} | |
} | |
return send_request(message).first["hostid"] | |
end |
// es = map exists tasks | |
List<Boolean> es = Lists.transform(tasks, new Function<File, Boolean>() { | |
@Override | |
public Boolean apply(File file) { | |
return file.exists(); | |
} | |
}); | |
α(L,P,R) :- β(L,P,R,0). | |
β([H|T],P,R,A) :- pow(H,P,X), β(T,P,R,A + X). | |
β([H],P,R,A) :- pow(H,P,X), R is A + X. | |
γ(X, Y, P) :- α(X, P, A), α(Y, P, B), A == B, !. | |
main(A) :- findall(X, (between(0,100,X), γ([0,3,5,6,9,10,12,15], [1,2,4,7,8,11,13,14], X)), A). |
Lemma mult_0_r : forall n:nat, | |
n * 0 = 0. | |
Proof. | |
intros n. induction n as [| n']. | |
(* Case "n = 0". *) | |
simpl. | |
reflexivity. | |
(* Case "n = S n'". *) | |
simpl. | |
rewrite -> IHn'. |
import Control.Monad (($), forM, undefined) | |
main = forM [] $ undefined |