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
Total 1 (delta 0), reused 0 (delta 0) | |
remote: /data/github/current/lib/github.rb:34: undefined method `env' for Rails:Module (NoMethodError) | |
remote: from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
remote: from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
remote: from /data/github/current/lib/rock_queue.rb:46 | |
remote: from hooks/post-receive:14:in `require' | |
remote: from hooks/post-receive:14 | |
To git@github.com:riffraff/project.git | |
cd2c1ce..5ded3e2 master -> master |
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
trait Htmlizable { | |
def safeStr(obj:Any):String = if (obj == null) "" else obj.toString | |
def persistentFields: Array[Field] = | |
getClass.getDeclaredFields.filter( f=> | |
f.getAnnotation(classOf[Persistent]) != null && | |
f.getAnnotation(classOf[PrimaryKey]) == null | |
) | |
def toForm(action:String): scala.xml.Elem = |
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
<data> <# visit-unique aka unique pair ip & user agent)> (<# ip> <# UA>) <# cities> <city names> | |
12/Nov/2010 4 (2 * 4) 2 (Malgrate,Milan) | |
13/Nov/2010 2 (1 * 2) 1 (Malgrate) | |
14/Nov/2010 2 (2 * 1) 2 (Como,Malgrate) | |
15/Nov/2010 5 (3 * 3) 1 (Milan) | |
16/Nov/2010 6 (2 * 5) 1 (Milan) | |
17/Nov/2010 4 (1 * 4) 1 (Milan) | |
18/Nov/2010 3 (2 * 3) 1 (Milan) |
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
mecbucpro:likex (master) riffraff$ cat >> tmp.rb | |
ENV['PATH']+=':ciao' | |
system('echo $PATH') | |
mecbucpro:likex (master) riffraff$ ruby tmp.rb | |
/Users/riffraff/.rvm/gems/ruby-1.8.7-p334/bin:/Users/riffraff/.rvm/gems/ruby-1.8.7-p334@global/bin:/Users/riffraff/.rvm/rubies/ruby-1.8.7-p334/bin:/Users/riffraff/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:ciao | |
mecbucpro:likex (master) riffraff$ |
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
task 'run' => :environment do | |
RubyProf.start | |
Bullet.enable=true | |
Bullet.start_request | |
20.times do | |
r = Rating.limit(20).includes(:comment => :post).to_a | |
end | |
Bullet.end_request | |
results = RubyProf.stop |
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
Suggestions from 2011/08/05 for non-obvious SF/Fantasy movies, with many thanks to anyone who answered. Apparently thee isn't much new for me but they were all great suggestions! | |
- gattaca (suggested twice. Great movie, but also quite known imho) | |
- dark city (loved it, generally underrated imho) | |
- primer (mindbending, cheaply made, very geeky) | |
- La jetée (TBD) | |
- pandorum (arguably the best "in space" movie to come out recently | |
- I'm a cyborg, but that's ok (not sci-fi but very enjoyable) | |
- Videodrome (masterpiece, very old but very famous) | |
- Aeon Flux (real actors movie: meh; animation: kewl) |
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
mecbucpro:~ riffraff$ ruby -e "Float('0.0')" | |
_____________________________________________________________________________ | |
| Configuration Files | | |
| | | |
| System File: /Users/riffraff/.rvm/rubies/maglev-head/etc/system.conf | | |
| | | |
| Executable File: /Users/riffraff/gem.conf | | |
| Warning: File not found (errno=2,ENOENT, The file or directory specified cannot | |
| be found) | |
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
>> 'asd'.pronounceable? | |
=> 0.3333333333333333 | |
>> 'sdf'.pronounceable? | |
=> 0.3333333333333333 | |
>> 'skdf'.pronounceable? | |
=> 0.25 | |
>> 'skadf'.pronounceable? | |
=> 0.6 | |
>> 'skadkf'.pronounceable? | |
=> 0.5 |
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
#matches something like an s-expression | |
R = %r@ | |
(?<atom> [-\w]+){0} | |
(?<quote> '\g<expr>){0} | |
(?<expr> | |
\g<atom> | | |
\g<quote> | | |
\( | |
\g<expr> | |
(?<exprs> (\s+ \g<expr>)* ) |
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
<!DOCTYPE html> | |
<html xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta charset="utf-8"> | |
<title> | |
All Topics | |
- The Latest News Headlines, Videos and Images |