ruby: random alphanumeric string
size = 8; (1..size).map{([*('a'..'z')]+[*('A'..'Z')]+[*(1..9)].map{|n|n.to_s}).instance_eval{self[rand(self.size)]}}.join
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
size = 8; (1..size).map{([*('a'..'z')]+[*('A'..'Z')]+[*(1..9)].map{|n|n.to_s}).instance_eval{self[rand(self.size)]}}.join
#! /bin/sh #Goto here here=/home/guillaume/Personal cd $here #BBC Lisbon weather id id=0048 #BBC weather RSS feed address feed="http://feeds.bbc.co.uk/weather/feeds/rss/5day/world/${id}.xml" #City city=lisbon #temporary file file="weather${city}" #Weather twitter bot twitbot=weatherlisbon:******* #Timestamp the log file echo .>> $file.log date >> $file.log #Read the RSS feed and filter it curl $feed | grep 'title' | tail -n 1 | perl -wlne'm/title>(.*)<\/title/i && print $1' | sed -e "s/°//g" > $file.txt #Read the forecast into a weather variable read weather < $file.txt #Twit the weather variable away curl --basic --user $twitbot --data status="$weather" http://twitter.com/statuses/update.xml >> $file.log
def wazup?(a) puts "#{a} dat!" end wazup?!!!?!??1:!!??
ruby -le'32.times{|y|print" "*(31-y),(0..y).map{|x|~y&x>0?" .":" A"}}'