This file contains hidden or 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
#!/bin/sh | |
## Information | |
## http://carlo-hamalainen.net/blog/2007/12/11/installing-minion-pro-fonts/ | |
## http://www.ctan.org/tex-archive/fonts/mnsymbol/ | |
## 0.1: Install LCDF Typetools | |
## http://www.lcdf.org/type/ | |
## If you use Homebrew (http://mxcl.github.com/homebrew/), then uncomment: | |
# brew install lcdf-typetools |
This file contains hidden or 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
user = User.from_omniauth(env['omniauth.auth']) | |
session[:auth_token] = user.auth_token | |
---- | |
user = User.from_omniauth(env['omniauth.auth']) | |
session[:auth_token] = user.auth_token |
This file contains hidden or 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 flash_message | |
types = { :notice => 'success', :alert => 'error', :info => 'info' } | |
flash.inject("") do |sum, message| | |
content_tag :div, :class => "alert alert-#{types[message[0]]}" do | |
button_tag('×'.html_safe, :type => 'button', :class => 'close', :'data-dismiss' => 'alert', :name => nil) + | |
message[1] | |
end | |
end | |
end |
This file contains hidden or 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(Math.floor(Math.random()*110)); |
This file contains hidden or 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
rvm gemset create mailcatcher | |
rvm use mailcatcher | |
gem install mailcatcher | |
rvm wrapper 1.9.3@mailcatcher --no-prefix mailcatcher catchmail | |
This file contains hidden or 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 foobar | |
# sux :( | |
foo = String.new | |
@bar.each do |b| | |
foo << b.body | |
end | |
foo | |
end |
This file contains hidden or 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
javascript:(function(){ var v = new RegExp("PersonalDocuments"); if (!v.test(document.URL)) { return false; } {a=document.getElementsByClassName('rowBodyCollapsed');for(var i = 0; i<a.length; i++){Fion.deleteItem('deleteItem_'+a[i].getAttribute('asin'));};return; }})(); |
This file contains hidden or 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
Não sei como é a receita original, mas o que eu fiz foi tirar um espresso e deixar ele esfriar na geladeira. Depois disso peguei um copo de 500ml, coloquei gelo e "Limonada do Bem" até completar uns 400ml. Adicionei umas 30 gotas de baunilha e virei o espresso gelado em cima. |
This file contains hidden or 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 irb -f --noverbose -r yaml -r open-uri --noprompt | |
YAML::load(open('http://is.gd/U4tpcO')) | |
exec("mpg123 #{_[ARGV[0]]}") unless _[ARGV[0]].nil? |
This file contains hidden or 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
unless := method( | |
(call sender doMessage(call message argAt(0))) ifFalse( | |
call sender doMessage(call message argAt(1))) ifTrue( | |
call sender doMessage(call message argAt(2))) | |
) | |
unless(1 == 2, write("One is not two\n"), write("one is two\n")) |