Skip to content

Instantly share code, notes, and snippets.

View a-b's full-sized avatar
🎯
Focusing

Al Berez a-b

🎯
Focusing
  • Broadcom
  • 03:41 (UTC -07:00)
View GitHub Profile
[alias]
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
wc = whatchanged -p
f = fetch -v --all
s = status -sb
b = branch
ba = branch -a -v -v
bs = !git-branch-status
bsi = !git-branch-status -i
ci = commit
#!/usr/bin/env ruby
# encoding: utf-8
FNAME = 'ff'
@lag_data = {}
File.open(FNAME).each do |line|
line.gsub!("\n",'')
time_area = line.split[2]
t1,t2,t3,t4,t5 = time_area.split("/").map(&:to_i)
signs_set = ('+' + '-' * 2 + ' ' * 5).split ''
signs_set.permutation(signs_set.length).to_a.uniq.each_with_index do |r,i|
str = (1..9).to_a.zip(r).flatten.join.gsub(' ','').to_s
eq_100 = eval(str).eql?(100)
puts [(i+1).to_s.rjust(3), '', str, '=', eval(str), eq_100 ? ' <---- !':'' ].join("\t")
end