Skip to content

Instantly share code, notes, and snippets.

View fredoliveira's full-sized avatar

Fred Oliveira fredoliveira

View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

{
// Editing, Syntax
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
// Window
"window.zoomLevel": 0,
// Editor
"editor.fontSize": 13,
@fredoliveira
fredoliveira / 0000_packages.config
Last active August 29, 2015 14:26 — forked from gcarrion-gfrmedia/0000_packages.config
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
# Install Git needed for Git based gems
packages:
yum:
git: []
module.exports = {
pivotal: {
TOKEN: 'TOKEN'
PID: 'PID',
},
sprintly: {
USER: "USER_EMAIL",
ID: 'PRODUCT_ID',
KEY: 'API_KEY'
},
@fredoliveira
fredoliveira / fasterdev
Last active December 16, 2015 23:59
For great victory. And faster development.
# grab the patch
# background info: https://gist.github.com/funny-falcon/4136373
curl -O https://raw.github.com/gist/4136373/falcon-gc.diff
# install ruby 1.9.3 patch level 327 with speed patch
rvm reinstall ruby-1.9.3-p327 --patch falcon-gc
# activate the new ruby
rvm use --default ruby-1.9.3-p327
@fredoliveira
fredoliveira / t.rb
Created June 3, 2012 15:59
Remove 80% of mention false positives from twitter
require 'rubygems'
require 'tweetstream'
require 'colorize'
regex = /@[f][\.\,\:]?\s/
TweetStream.configure do |config|
config.consumer_key = ''
config.consumer_secret = ''
config.oauth_token = ''
@fredoliveira
fredoliveira / .tmux.conf
Created March 27, 2012 04:05
Tmux config file
# new prefix
set -g prefix C-a
unbind C-b
# reload the config
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# set the shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
@fredoliveira
fredoliveira / gist:1680217
Created January 26, 2012 01:06
Computer bootstrap
@fredoliveira
fredoliveira / week.rb
Created December 18, 2011 16:03
Script to calculate the current week for weekly notes
#!/usr/bin/ruby
require 'date'
registration_date = Date.civil(2006,1,13)
this_week = Date.today
# Get the start of the week for each of those dates
if registration_date.wday == 0
# wday of 0 is Sunday, and we want our weeks to start on Monday
@fredoliveira
fredoliveira / redis
Created September 8, 2011 18:29
ubuntu init.d script for redis
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db