Skip to content

Instantly share code, notes, and snippets.

Avatar

George Guimarães georgeguimaraes

View GitHub Profile
View keybase.md

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:

View keybase.md

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:

View gist:3048714
" 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 — forked from rrrodrigo/unicorn.sh
init.d script for starting multiple unicorn-based apps
View unicorn.sh
#!/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 Mar 22, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/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 Jan 26, 2012
rbenv install and system wide install on Ubuntu 10.04 LTS.
View rbenv-install-system-wide.sh
# 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:
View brew-services.rb
#!/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>
View gist:591202
<?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 Sep 1, 2010
And Begin Idiom to avoid if with assignments
View and_begin_idiom.rb
# 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 Jun 30, 2010
one-liners and scripts to deal with apache logs
View apache-log-parser.rb
# 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'
You can’t perform that action at this time.