Skip to content

Instantly share code, notes, and snippets.

View cfcosta's full-sized avatar

Cainã Costa cfcosta

  • São Paulo, Brazil
View GitHub Profile
" Indent configuration
autocmd FileType ruby set ts=2 sts=2 sw=2 re=1
autocmd FileType yaml set ts=2 sts=2 sw=2
autocmd FileType c,cpp set ts=4 sts=4 sw=4
autocmd FileType css,html set ts=2 sts=2 sw=2
autocmd FileType vim set ts=2 sts=2 sw=2
autocmd FileType bash,zsh set ts=2 sts=2 sw=2
autocmd FileType sql set ts=2 sts=2 sw=2
"$HOME/.rbenv/bin: Disable folds to avoid slowness
This file has been truncated, but you can view the full file.
# Logfile created on 2017-03-06 17:12:44 -0300 by logger.rb/56504
[----] D, [2017-03-06T17:12:44.556723 #19943:2afa865b1980] DEBUG -- : PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0
[----] D, [2017-03-06T17:12:44.680628 #19943:2afa865b1980] DEBUG -- : MiqServer Load (0.6ms) SELECT "miq_servers".* FROM "miq_servers" WHERE "miq_servers"."guid" = $1 LIMIT $2 [["guid", "dc4343be-02a7-11e7-a1b2-0242a89f1cd9"], ["LIMIT", 1]]
[----] D, [2017-03-06T17:12:44.750165 #19943:2afa865b1980] DEBUG -- :  (0.2ms) SELECT last_value FROM miq_databases_id_seq
[----] D, [2017-03-06T17:12:44.755576 #19943:2afa865b1980] DEBUG -- : MiqRegion Load (0.4ms) SELECT "miq_regions".* FROM "miq_regions" WHERE "miq_regions"."region" = $1 LIMIT $2 [["region", 0], ["LIMIT", 1]]
[----] D, [2017-03-06T17:12:44.789966 #19943:2afa865b1980] DEBUG -- : SettingsChange Load (0.4ms)
" Indent configuration
autocmd FileType ruby set ts=2 sts=2 sw=2 re=1
autocmd FileType yaml set ts=2 sts=2 sw=2
autocmd FileType c,cpp set ts=2 sts=2 sw=2
autocmd FileType css,html set ts=2 sts=2 sw=2
"$HOME/.rbenv/bin: Disable folds to avoid slowness
set foldmethod=manual
" Automatically expand tabs into spaces

Keybase proof

I hereby claim:

  • I am cfcosta on github.
  • I am cfcosta (https://keybase.io/cfcosta) on keybase.
  • I have a public key ASBRwJRldQKo_lQ3b6fOnNjIKRxb47JPNdcwylwfU2l-YAo

To claim this, I am signing this object:

@cfcosta
cfcosta / Gemfile
Created January 1, 2014 09:42
Yeoman to S3 deploy script.
source 'https://rubygems.org'
gem 'unf'
gem 'fog'
gem 'mime-types', require: 'mime/types'
#!/usr/bin/env ruby
require 'fileutils'
require 'rubygems'
require 'sqlite3'
class WeightTracker
def initialize
@db_file = File.expand_path("~/.wt.db")
end
#!/usr/bin/env ruby
require 'fileutils'
require 'rubygems'
require 'sqlite3'
class WeightTracker
def initialize
@db_file = File.expand_path("~/.wt.db")
end
@cfcosta
cfcosta / gist:4462975
Last active December 10, 2015 16:48 — forked from anonymous/gist:4462969
class User < ActiveRecord::Base
def self.create_from_omniauth_data(data)
user = new
user.external_provider = true
user.name = data['info']['email']
user.email = data['info']['email']
user.authorizations.build(:provider => omniauth['provider'], :uid => omniauth['uid'])
user.save!
end
>> x = 1,2,3
=> [1, 2, 3]
>> x.object_id
=> 70290220560040
>> x.delete_if { |y| y > 1 }
=> [1]
>> x.object_id
=> 70290220560040
>> x
=> [1]
/*
*= require_tree ./vendor
*= require_directory .
*/