Skip to content

Instantly share code, notes, and snippets.

View breim's full-sized avatar
:shipit:

Henrique Breim breim

:shipit:
  • Barcelona, Spain
View GitHub Profile
@breim
breim / .vimrc
Created August 23, 2018 18:48 — forked from joegoggins/.vimrc
Mac Vim .vimrc file
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" ================ General Config ====================
set number "Line numbers are good
set backspace=indent,eol,start "Allow backspace in insert mode
set history=1000 "Store lots of :cmdline history
set showcmd "Show incomplete cmds down the bottom
# Scenario 1: remote resource returns a binary file;
# the last part of the uri represents the file name
# e.g. http://someurl.com/artists/jeanlucponty/tracks/elephants-in-love.mp3
class Audio < ActiveRecord::Base
has_attached_file :file
def file_from_url(url)
self.file = download_remote_file(url)
end
@breim
breim / 0_reuse_code.js
Created July 10, 2014 04:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console