Skip to content

Instantly share code, notes, and snippets.

View eduardodeoh's full-sized avatar
🏠
Working from home

Eduardo de Oliveira Hernandes eduardodeoh

🏠
Working from home
  • São José do Rio Preto / SP / Brasil
View GitHub Profile

Setup

git clone <repo>

clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS

Add colors to your ~/.gitconfig file:

Contrato Arrasador 3

Revisão: 02/05/2013

Entre nós [nome nossa empresa] e você [nome cliente]

Sumário:

Nós sempre faremos o melhor para cumprir suas necessidades e atender suas expectativas, mas é importante registrar tudo por escrito para que todos saibam quem deve fazer o quê e quando, e o que acontece quando algo der errado. Neste contrato você não encontrará nenhum termo jurídico complicado ou longas passagens de textos incompreensíveis. Não temos interesse em fazê-lo assinar algo que poderá se arrepender depois. O que queremos é o melhor para ambas as partes, agora e no futuro!

@eduardodeoh
eduardodeoh / gitlab
Created November 2, 2012 21:08
Gitlab configuration for Nginx + Unicorn
server {
listen 80;
server_name gitlab.eduardodeoh.com.br;
root /home/gitlab/gitlab/public;
# individual nginx logs for this gitlab vhost
access_log /var/log/nginx/gitlab_access.log;
error_log /var/log/nginx/gitlab_error.log;
location / {
@eduardodeoh
eduardodeoh / graphite
Created November 2, 2012 21:07
Graphite configuration for Nginx + Gunicorn
server {
listen 80;
server_name graphite.eduardodeoh.com.br;
## path for static files
root /opt/graphite/webapp/content;
location /media/ {
# this changes depending on your python version
root /usr/local/lib/python2.7/dist-packages/django/contrib/admin;
@eduardodeoh
eduardodeoh / todolist
Created November 2, 2012 21:05
Todolist - My Rails App conf for nginx
server {
listen 80 default deferred;
server_name app1.eduardodeoh.com.br;
root /var/www/rails_apps/todolist/current/public;
charset utf-8;
location ^~ /assets/ {
gzip_static on;
expires max;
@eduardodeoh
eduardodeoh / upstream.conf
Created November 2, 2012 21:02
Upstream configuration for nginx
#Upstream for Graphite
upstream graphite_app {
server 127.0.0.1:8000 fail_timeout=0;
}
#Upstream for my app
upstream unicorn-todolist {
server unix:/var/www/rails_apps/todolist/current/tmp/sockets/unicorn.socket fail_timeout=0;
}
@eduardodeoh
eduardodeoh / nginx.conf
Created November 2, 2012 20:53
Nginx Basic Example
user www-data;
worker_processes 2;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
@eduardodeoh
eduardodeoh / unicorn.rb
Created November 2, 2012 20:38
Unicorn Configuration Example
#APP DIRECTORY
app_dir="/var/www/rails_apps/todolist/current"
# Use at least one worker per core if you're on a dedicated server,
# more will usually help for _short_ waits on databases/caches.
worker_processes 1
# Help ensure your application will always spawn in the symlinked
# "current" directory that Capistrano sets up.
working_directory app_dir
@eduardodeoh
eduardodeoh / unicorn_init.sh
Created November 2, 2012 20:21
Unicorn Init
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Manage unicorn server
# Description: Start, stop, restart unicorn server for a specific application.
### END INIT INFO
@eduardodeoh
eduardodeoh / send_metric_to_statsd.sh
Created November 1, 2012 19:37 — forked from nstielau/send_metric_to_statsd.sh
Send a metric to StatsD from bash
# Send a metric to statsd from bash
#
# Useful for:
# deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/)
# init scripts
# sending metrics via crontab one-liners
# sprinkling in existing bash scripts.
#
# netcat options:
# -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed.