Skip to content

Instantly share code, notes, and snippets.

@everaldo
everaldo / Gemfile
Created January 15, 2014 19:43 — forked from cblunt/Gemfile
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL
#!/bin/bash
set -e
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@everaldo
everaldo / unicorn-app.sh
Created March 21, 2014 14:29
Gist /etc/init.d script do Unicorn
################################################################################
# unicorn.sh
################################################################################
#!/usr/bin/env bash
set -e
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
AS_USER="USER_NAME"
@everaldo
everaldo / municipios.yml
Created April 22, 2014 13:48
Lista de UFs e Municípios, segundo IBGE 2013 (5570 municípios)
---
- :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'
@everaldo
everaldo / install_postgresql.sh
Created August 16, 2014 19:25
Install Postgresql
# Postgresql
# https://wiki.postgresql.org/wiki/Apt
#Quickstart
#Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. In the example, replace wheezy with the actual #distribution you are using:
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
#(You may determine the codename of your distribution by running lsb_release -c.)
#Import the repository key from https://www.postgresql.org/media/keys/ACCC4CF8.asc, update the package lists, and start installing #packages:
@everaldo
everaldo / tmux.conf
Last active August 29, 2015 14:12
tmux.conf
set -s escape-time 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# splitting panes
# START:panesplit
bind | split-window -h
bind - split-window -v
# END:panesplit
# moving between panes
@everaldo
everaldo / page.html
Created May 8, 2015 19:26
Esqueleto HTML5
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<link rel="stylesheet" type="text/css" media="screen" href="" />
<script type="text/javascript" src=""></script>
</head>
<body>
@everaldo
everaldo / referencias.txt
Created May 8, 2015 19:47
Referências PHP
Cookies:
http://php.net/manual/pt_BR/features.cookies.php
Session:
http://php.net/manual/pt_BR/book.session.php
Arrays:
@everaldo
everaldo / contador.php
Created May 8, 2015 23:21
Contador de visitas
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Contador de Visitas</title>
</head>
<body>
<?php
@everaldo
everaldo / contador.php
Created May 9, 2015 00:02
contador, segunda versão
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Contador de Visitas</title>
</head>
<body>
<?php