Skip to content

Instantly share code, notes, and snippets.

View xdougx's full-sized avatar

Douglas Rossignolli xdougx

View GitHub Profile
---
- :cod_uf: '52'
:uf: Goiás
:city_id: '00050'
:city: Abadia de Goiás
:sigla_uf: GO
:city_code: '5200050'
- :cod_uf: '31'
:uf: Minas Gerais
:city_id: '00104'
@xdougx
xdougx / redis_persistence.rb
Last active August 29, 2015 13:57
Simple Redis Persistence with Namespace and Keys
# Classe que faz uma simples persistencia para o Redis, usando de métodos simples.
# @author Douglas Rossignolli
# @version 0.0.5
class RedisPersistence
attr_accessor :redis
def initialize
if Rails.env.production?
ENV["REDISTOGO_URL"] ||= "<redis server uri>"
uri = URI.parse(ENV["REDISTOGO_URL"])
@redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
@xdougx
xdougx / git_cmd.markdown
Last active December 19, 2015 19:49
comandos para o git

GIT

Commitar uma feature

git add . => Adiciona todas as mudanças
git commit -a -m "<mensagem do commit>"
git push origin staging

Sincronizar

var IApp = (function() {
var InterfaceApp = function() {
this.run = function(obj, vars) {
if(obj == null) { obj = this.modules; }
if(vars !== undefined) { this.addGlobals(vars); }
this.callEvents(obj);
};