Git Cheat Sheet (Debian based)
2009
apt-get remove --purge gitk gitosis git-gui git-core
apt-get install mercurial
my web space
apt-get remove --purge gitk gitosis git-gui git-core
apt-get install mercurial
Why Assembla free plan:
P.S. If you are like me - spitting on GIT on a daily basis - Mercurial is included in the other plans.
# sort by user id ruby -a -F: -ne 'puts $F.values_at(2, 0).join("\t")' '/etc/passwd' | sort -g # sort by user home directory ruby -a -F: -ne 'puts $F.values_at(5, 0).join("\t")' '/etc/passwd' | sort -g # sort by username ruby -a -F: -ne 'puts $F.values_at(0).join("\t")' '/etc/passwd' | sort -g
positive = 10.01 # the negative equivalent: -10.01 negative = positive - (positive * 2) negative = positive * -1 # or negative = positive / -1 negative = -positive # or negative = ---positive
AoH = [{"z"=>26}, {"g"=>7}, {"r"=>18}, {"a"=>1}, {"v"=>22}] # sort by key AoH.map{|e| e.to_a.flatten}.sort{|x,y| x[0] < => y[0]} # sort by value AoH.map{|e| e.to_a.flatten}.sort{|x,y| x[1] < => y[1]}
Here’s the mirror
Behind there is a screen
Turn around
On both ways you can get in
The experience of survival
Look around just people, can you hear their voice
Find the one who’ll guide you to the limits of your choice
The experience / of survival
Try to think about it …
That’s the chance to live your life and discover
Try to think about it
The experience of survival
The experience …
The experience of survival
The experience …
Charts for a map (in this example I’ve included Spain, France, Italy and Norway):
more about this API
class MyString < String # not really useful alias + concat # emulates Array '*' method def *(string) self.split('').inject('') do |s1,c| s1 + c + string end end # emulates Array '-' method def /(string) (self.split('') - string.split('')).to_s end # chars' delimiter def delimiter(string) self.*(string).sub /.$/, '' end end a = MyString.new("abcdef") b = MyString.new("ABCDEF") puts a * ':' puts a / (b + "a") puts a.delimiter(":") #a:b:c:d:e:f: #bcdef #a:b:c:d:e:f
command-line cheat sheets
279 cheat sheets:
$cheat sheets
$cheat unix_text
cat - concatenate and display files
cut - remove selected fields from each line of a file
sort - sort and collate lines
uniq - remove or report adjacent duplicate lines
awk - pattern scanning and processing language
sed - stream editor
tr - translate characters
diff - display line-by-line differences between pairs of text files
grep, egrep, fgrep - search a file for a string or regular expression
paste - join corresponding lines of several files, or subsequent lines of one
file
colrm - remove characters from specified columns within each line
expand, unexpand - expand TAB characters to SPACE characters, and vice versa
Comment