This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun mycal (foo bar) | |
(interactive) | |
(concatenate 'string | |
"top:" | |
(format nil "~s" (- foo 111)) | |
"px;" | |
(format nil "~%") | |
"left:" | |
(format nil "~s" (- bar 370)) | |
"px;")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dotimes (i 100) | |
(concatenate 'string "y_" (format nil "~s" i)))) | |
;; OR | |
(dotimes (i 100) | |
(substitute-string (format nil "~s" i) "^" "y_"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:Entries tags="NOT foo AND bar">blur blur blur</mt:Entries> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vlookup-symbol () { | |
ls -al $1 | awk '{print "echo", $9, $11}' | sh | while read C1 C2 | |
do | |
if [ ${C2} = "$2" ] | |
then | |
echo ${C1} | |
break | |
fi | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pr /home/foo/MailBox/*/.mailfilter > bar.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cygwin: | |
function put-rsync () { | |
rsync \ | |
—verbose \ | |
—exclude=.old \ | |
—exclude=consul/* \ | |
—exclude=cgi-bin \ | |
—exclude=link/* \ | |
—delete \ | |
—checksum \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias find-find-file for i in {find $*} {find-file $i} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prime_number(number) | |
container = [1] | |
ary = (2..number).to_a | |
tmp = ary.shift | |
while tmp | |
ary.delete_if { |i| i % tmp == 0 } | |
container << tmp | |
tmp = ary.shift | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby1.9 | |
class Class | |
def descendants | |
ObjectSpace.each_object(::Class).select {|klass| klass < self } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get -y purge scala-library scala sbt | |
sudo apt-get -y remove scala-library scala sbt | |
sudo apt-get -y purge openjdk-\* icedtea-\* icedtea6-\* | |
apt-cache search java | awk '{print($1)}' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e 'java-common' | xargs sudo apt-get -y remove | |
sudo apt-get -y autoremove | |
dpkg -l | grep ^rc | awk '{print($2)}' | xargs sudo apt-get -y purge | |
sudo rm -rf /usr/lib/jvm |