Skip to content

Instantly share code, notes, and snippets.

View ngpestelos's full-sized avatar

Nestor G Pestelos Jr ngpestelos

View GitHub Profile
@ngauthier
ngauthier / README.md
Created March 12, 2012 01:14
Ruby Workflow Benchmark

Ruby Workflow System Benchmark

Why?

I've chatted with people that love working on their macbook airs, and honestly, they have a lot going for them. They're nice light machines with a surprising amount of performance for their form factor.

I always argue that they're way slower than much cheaper machines, like a good workstation. Ergonomics aside, I wanted to get some performance numbers.

I've attached a script to this gist that will grab Sinatra and time how long it takes to bundle it, run the full tests, and run a single test.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — 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
#
@cheeaun
cheeaun / rdrc2012.md
Created May 19, 2012 14:45
RedDotRubyConf 2012 links & resources
@tansengming
tansengming / configure.rb
Created July 9, 2012 07:37
Ruby configure blocks
# How Clearance / Hoptoad does it
module Clearance
class << self
attr_accessor :configuration
end
def self.configure
self.configuration ||= Configuration.new
yield(configuration)
end
@cmarguel
cmarguel / philippine-defense-squad.md
Last active May 25, 2016 21:01
Filipinos overreacting to foreigners and fellow Filipinos but mainly foreigners

philippine-defense-squad.txt v 0.1

This text file seeks to become a comprehensive listing of all instances of times when Filipinos overreact to criticism (both deserved and undeserved) by descending upon the subject like a swarm of angry bees and inflicting their wrath through letters, blogs, Photoshop contests, and other zany means of reaction. Anyone who figures out how to contact me is welcome to contribute.

  • the spoon incident in Canada, which really turned out to be the fault of the boy;
  • Art Bell's racist comments against Pinoys, actually a hoax
  • Filipinos getting angry over the Faye Nicole San Juan incident, which later turned out to be a hoax
  • Claire Danes goes to the Philippines; gets declared persona non grata after making a few remarks that some people didn't like hearing
  • Americans go to Jollibee and get flamed by a thousand angry Pinoys who can't bear the thought that other cultures might be weirded out by other cultures
  • Malu Fernandez receives flames and death threats after putting her

Development box installation guide

This guide will show how to setup a VirtualBox similiar to an Ubuntu 12.04.1 server for use with Amazon EC2.

Covered in this guide:

  • VeeWee: Tool for building base boxes which will be used by vagrant
  • Vagrant: Tool for managing virtual machines with an easy to use CLI
  • Librarian: Bundler for chef cookbooks
  • Chef-solo & Knife solo: Tool for automating installing and management of servers
@radamanthus
radamanthus / gist:5095797
Created March 6, 2013 00:48
RailsGirls followup activity
<This is a brain dump. Please forgive any typos>
I'd like to share an idea for a RailsGirls followup activity.
I noticed that having your stuff deployable and out on the net is a very powerful source of inspiration.
For me it makes me keep on working on it, just knowing that other people can see it.
One of the stumbling blocks in learning Rails is deployment. It's an advanced topic that is oddly too often taught in intro courses.
Forget about teaching deployment. Let's just give the newbs a ready-to-use VPS.

Security is Hard

Massive Assignment

  • watch for ActiveRecord Relation, like has_many, has_many :through
  • watch for user_roles, `group_users
  • UPDATE action

Admin

@dqminh
dqminh / applause_formatter.rb
Last active December 18, 2015 04:59
rspec formatter that applause you when your tests pass
require "rspec/core/formatters/progress_formatter"
class ApplauseFormatter < RSpec::Core::Formatters::ProgressFormatter
def initialize(output)
super(output)
unless File.exists? "/tmp/applause.mp3"
p "Downloading applause for awesomeness"
system "wget http://www.soundjay.com/human/applause-1.mp3 -O /tmp/applause.mp3"
end
end
@shin1x1
shin1x1 / Vagrantfile
Created December 10, 2013 06:47
Docker Provisioner sample on Vagrant 1.4
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.provision "docker" do |d|
d.run "ubuntu",
cmd: "bash -l",
args: "-v '/vagrant:/var/www'"
end