Skip to content

Instantly share code, notes, and snippets.

View maurogeorge's full-sized avatar

Mauro George maurogeorge

View GitHub Profile
@maurogeorge
maurogeorge / Gemfile
Last active August 29, 2015 14:00
Sample code to show the filepicker-rails on this issue https://github.com/Ink/filepicker-rails/issues/82
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
@maurogeorge
maurogeorge / active_record_master.rb
Created February 2, 2014 22:54
Self executable gist to show the error of issue https://github.com/rails/rails/issues/13923 on Rails
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@maurogeorge
maurogeorge / gist:7617798
Created November 23, 2013 17:55
Command to highlight a file with pygments and copy as RTF to paste on a keynote for example
pygmentize -l ruby -f rtf -O style=default app/models/user.rb | pbcopy -Prefer rtf
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 48 | 37 | 3 | 7 | 2 | 3 |
| Helpers | 2 | 2 | 0 | 0 | 0 | 0 |
| Models | 65 | 53 | 3 | 2 | 0 | 24 |
| Mailers | 0 | 0 | 0 | 0 | 0 | 0 |
| Javascripts | 17 | 0 | 0 | 0 | 0 | 0 |
| Libraries | 0 | 0 | 0 | 0 | 0 | 0 |
| Acceptance specs | 9 | 7 | 0 | 0 | 0 | 0 |
@maurogeorge
maurogeorge / .vimrc
Last active December 15, 2015 11:38
My .vimrc file
" Moved to https://github.com/maurogeorge/dotfiles
@maurogeorge
maurogeorge / .bash_profile
Last active September 29, 2015 16:48
My prompt, a ubuntu like style with a lot of colors. Sample: user@machine:current_dir(current_branch)$
# Moved to https://github.com/maurogeorge/dotfiles