Ouça a playlist no Rdio.
Música que mostrou a cara da banda pro mundo. Refrão marcante, meio chiclete. Encaixa em qualquer trilha sonora de comercial modernoso.
Ouça a playlist no Rdio.
Música que mostrou a cara da banda pro mundo. Refrão marcante, meio chiclete. Encaixa em qualquer trilha sonora de comercial modernoso.
{ | |
"auto_match_enabled": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/User/Xcode_default.tmTheme", | |
"draw_white_space": "false", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Monaco", | |
"font_size": 15.0, | |
"highlight_line": true, |
# This initializer adds a method, show_mongo, when running a rails console. When active, all | |
# moped commands (moped is mongoid's mongodb driver) will be logged inline in the console output. | |
# If called again, logging will be restored to normal (written to log files, not shown inline). | |
# Usage: | |
# > show_mongo | |
if defined?(Rails::Console) | |
def show_mongo | |
if Moped.logger == Rails.logger | |
Moped.logger = Logger.new($stdout) |
class ProductsController < ApplicationController | |
def index | |
@products = Product.vitrine(34) | |
respond_with @products | |
end | |
end | |
class Product < ActiveRecord::Base | |
def self.vitrine(limit) | |
with_state(:published).limit(limit) |
Add debugger
to Gemfile
Run bundle
Require debugger
on config/application.rb
Run git stash save 'debugger'
Add the following aliases to .gitconfig
:
debugger = stash apply stash^{/debugger}
dropdebugger = checkout Gemfile Gemfile.lock config/application.rb
- (void) getDataFromLocalJSON | |
{ | |
NSString *jsonPath = @"response.json"; | |
NSFileHandle *file; | |
NSData *databuffer; | |
file = [NSFileHandle fileHandleForReadingAtPath: jsonPath]; | |
if (file) { | |
databuffer = [file readDataToEndOfFile]; | |
[file closeFile]; | |
} |
- (BOOL) isConnectedToNetwork | |
{ | |
Reachability *hostReachable = [Reachability reachabilityWithHostName:@"www.google.com"]; | |
NetworkStatus internetStatus = [hostReachable currentReachabilityStatus]; | |
return ((internetStatus == ReachableViaWiFi) || (internetStatus == ReachableViaWWAN)); | |
} |
# This is part of my .pryrc. | |
# I put this at the section where I load Rails stuff, so I can use Pry instead of IRB | |
# for my Rails Console sessions | |
# Once this is loaded, just run the display_routes method from the console to see the same output that rake routes displays. | |
# I think it's better because I always leave a Rails console session running :) | |
require 'rails/application/route_inspector' |
class Credential | |
include ActiveModel::Validations | |
attr_accessor :screen_name, :oauth_token, :oauth_secret, :token, :description | |
validates_presence_of :screen_name, :oauth_token, :oauth_secret, :message => 'required' | |
validate :user_exists, :unless => :errors? | |
def initialize(attributes = {}) | |
attributes.each { |k, v| set_recognized_attribute(k, v) } |
$ michaelis ruby
Michealis Dictionary
Translate: ruby (ingles-portugues)
ruby
ru.by
n 1 Min rubi, rubim. 2 cor do rubi. 3 algo semelhante ao rubi em cor como: vinho tinto, carbúnculo, sangue. 4 Typogr tipo de corpo 5 1/2. • vt ruborizar. • adj da cor do rubi, vermelho-vivo.
---