Skip to content

Instantly share code, notes, and snippets.

View georgeguimaraes's full-sized avatar
💭
🔧

George Guimarães georgeguimaraes

💭
🔧
View GitHub Profile

Keybase proof

I hereby claim:

  • I am georgeguimaraes on github.
  • I am georgeguimaraes (https://keybase.io/georgeguimaraes) on keybase.
  • I have a public key ASBLJySzGrojhwBJRMcxo6eONNPojWAeBshIAqKigifw9go

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am georgeguimaraes on github.
  • I am georgeguimaraes (https://keybase.io/georgeguimaraes) on keybase.
  • I have a public key whose fingerprint is FCE8 DF97 5663 3A3D 0281 099E 3D24 7B42 2D56 8534

To claim this, I am signing this object:

@georgeguimaraes
georgeguimaraes / gist:3048714
Created July 4, 2012 18:16
railscasts-george.vim
" Vim color scheme
"
" Name: railscast.vim
" Maintainer: Josh O'Rourke <joshorourke@me.com>
" License: public domain
"
" A GUI Only port of the RailsCasts TextMate theme [1] to Vim.
" Some parts of this theme were borrowed from the well-documented Lucius theme [2].
"
" [1] http://railscasts.com/about
@georgeguimaraes
georgeguimaraes / unicorn.sh
Created May 15, 2012 19:36 — forked from rrrodrigo/unicorn.sh
init.d script for starting multiple unicorn-based apps
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
@georgeguimaraes
georgeguimaraes / hack.sh
Created March 22, 2012 23:49 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@georgeguimaraes
georgeguimaraes / rbenv-install-system-wide.sh
Created January 26, 2012 17:20
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
<?php
if(isset($_POST['email'])) {
$to = "meu-email@exemplo.com";
$subject = "Contato";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Telefone: $phone\n Mensagem:\n $message";
@georgeguimaraes
georgeguimaraes / and_begin_idiom.rb
Created September 1, 2010 17:11
And Begin Idiom to avoid if with assignments
# After reading this comment
# http://avdi.org/devblog/2010/08/02/using-and-and-or-in-ruby/#comment-1098 ,
#
# I became aware of a cool idiom for Ruby.
#
# I've seen this in a lot of cases:
if (variable = expression_or_method(options))
variable.calculate_something
do_other_stuff(variable)
@georgeguimaraes
georgeguimaraes / apache-log-parser.rb
Created June 30, 2010 23:09
one-liners and scripts to deal with apache logs
# original from http://vafer.org/blog/20081121232846
# changed to output requests per second
#!/usr/bin/ruby
# MIT License
# based on http://topfunky.net/svn/plugins/mint/lib/log_parser.rb
# from Jan Wikholm
require 'date'