Skip to content

Instantly share code, notes, and snippets.

View birula's full-sized avatar
😀

Lucas Crivellari Macieira birula

😀
  • Juiz de Fora - MG, Brasil
View GitHub Profile
@birula
birula / gist:3018158
Created June 29, 2012 14:06
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
# Compatible with Devise 3.1
# https://gist.github.com/birula/8596087
pt-BR:
devise:
confirmations:
confirmed: "Sua conta foi confirmada com sucesso."
confirmed_and_signed_in: "Sua conta foi confirmada com sucesso. Você está logado."
send_instructions: "Dentro de minutos você receberá um e-mail com instruções para confirmar a sua conta."
send_paranoid_instructions: "Caso seu e-mail exista em nossa base, você receberá um e-mail em poucos minutos com instruções sobre como confirmar sua conta."
@birula
birula / gist:9077748
Last active January 10, 2018 21:08 — forked from trcarden/gist:3295935
Using SSL in your local rails environment
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@birula
birula / plotter.rb
Created March 28, 2014 14:42
Ruby Wraper to Gnuplot
require 'open3'
class GNUPlotter < Struct.new(:data, :params)
def plot
image, s = Open3.capture2("gnuplot", stdin_data: gnuplot_commands, binmode: true)
system "open #{params[:image_name]}"
end
private
def gnuplot_commands
@birula
birula / console.output
Last active May 1, 2016 22:54
mix phoenix.routes
➜ test mix phoenix.routes
page_path GET / Test.PageController :index
register_path POST /register Test.Addict.AddictController :register
register_path GET /register Test.Addict.AddictController :register
login_path POST /login Test.Addict.AddictController :login
login_path GET /login Test.Addict.AddictController :login
logout_path POST /logout Test.Addict.AddictController :logout
logout_path GET /logout Test.Addict.AddictController :logout
recover_password_path POST /recover_password Test.Addict.AddictController :recover_password
recover_password_path GET /recover_password Test.Addict.AddictController :recover_password