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
weekday = 10 | |
console.log 'this will be printed 10 times' for index in [0..(weekday-1)] |
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
/* http://api.themoviedb.org/3/movie/188?api_key=my_key&language=en */ | |
{"adult":false,"backdrop_path":"/wyey4NS4Z1z7293R8FFBETL6DSr.jpg","belongs_to_collection":null,"budget":0,"genres":[{"id":28,"name":"Action"},{"id":53,"name":"Thriller"}],"homepage":"","id":188,"imdb_id":"tt0401792","original_title":"Sin City","overview":"The Sin City series. Director Robert Rodriguez makes the legendary comic artist Frank Miller (Batman and Daredevil) into a series of films depicting his Sin City comics. The films however are not for children.","popularity":0.06,"poster_path":"/mYxbfd8pZz9YTtEFRaOcQboOvMk.jpg","production_companies":[],"production_countries":[],"release_date":null,"revenue":0,"runtime":0,"spoken_languages":[],"tagline":"","title":"Sin City","vote_average":0.0,"vote_count":0} | |
/* http://api.themoviedb.org/3/movie/tt0401792?api_key=my_key&language=en */ | |
{"adult":false,"backdrop_path":"/kftq445wZNaKEqJ9gXwYOIfI2p1.jpg","belongs_to_collection":{"id":188,"name":"Sin City","poster_path":"/mYxbfd8pZz9YTtEFRaO |
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
# twitter_link = https://twitter.com/#!/irio | |
# twitter_link = https://twitter.com/#!/irio/ | |
# twitter_link = https://twitter.com/irio/ | |
# twitter_link = https://twitter.com/irio | |
"@" + /twitter.com\/(#!\/)?(.[^\/]+)/.match(twitter_link)[2] # => "@irio" |
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
# OAuth | |
config.omniauth :facebook, "306897372733415", "178333649c7a3ae4842038a110e36e19", | |
{:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}} |
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
class AddFacebookUidToUsers < ActiveRecord::Migration | |
def change | |
add_column :users, :facebook_uid, :string | |
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
?({"Status":"EmAnalise","Codigo":0,"CodigoRetorno":"","TaxaMoIP":"1.45","StatusPagamento":"Sucesso","Classificacao":{"Codigo":999,"Descricao":"No suportado no ambiente Sandbox"},"CodigoMoIP":69690,"Mensagem":"Requisio processada com sucesso","TotalPago":"14.30"}) |
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
class FakeParser | |
def self.call(body, format) | |
body | |
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
class SinglePages | |
file :about, %w(text) | |
class << self | |
# Generate write method to this file | |
def file(filename, attrs) | |
define_method "write_#{filename}" do |properties_hash| | |
puts properties_hash | |
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
<%- model_class = @rental.class -%> | |
<h1><%=t '.title', :default => model_class.model_name.human %></h1> | |
<dl class="dl-horizontal"> | |
<dt><strong><%= model_class.human_attribute_name(:start_date) %>:</strong></dt> | |
<dd><%= @rental.start_date %></dd> | |
<dt><strong><%= model_class.human_attribute_name(:end_date) %>:</strong></dt> | |
<dd><%= @rental.end_date %></dd> | |
<dt><strong><%= model_class.human_attribute_name(:ocupation) %>:</strong></dt> | |
<dd><%= @rental.ocupation %></dd> |
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
import com.actionbarsherlock.app.ActionBar; | |
import com.actionbarsherlock.app.ActionBar.Tab; | |
import com.actionbarsherlock.app.SherlockActivity; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.graphics.Color; | |
import android.graphics.drawable.Drawable; | |
import android.util.Log; | |
import android.view.Menu; |