Skip to content

Instantly share code, notes, and snippets.

View gbpereira's full-sized avatar

Guilherme Pereira gbpereira

View GitHub Profile
@gbpereira
gbpereira / filterable.rb
Last active September 8, 2015 12:49 — forked from justinweiss/filterable.rb
Filterable
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with the same name as the keys in <tt>filtering_params</tt>
# with their associated values. Most useful for calling named scopes from
#!/bin/bash
DBNAME=<database_name>
DBUSER=<database_user>
DBHOST=<host>
DUMP_FILE=$1
if [[ $DUMP_FILE == "" ]]; then
echo "[ERROR] Arquivo de dump não especificado"
@gbpereira
gbpereira / .vimrc
Created February 15, 2018 20:18 — forked from luizhpcamargo/.vimrc
Vim configuration
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@gbpereira
gbpereira / gnome-terminal-profiles.md
Created September 3, 2023 02:05 — forked from fdaciuk/gnome-terminal-profiles.md
Export / Import Gnome Terminal Profiles

Export Gnome Terminal Profile

List profiles

dconf dump /org/gnome/terminal/legacy/profiles:/

Determine the terminal profile string for the profile you will need. This is the terminal profile that I will export: