Skip to content

Instantly share code, notes, and snippets.

@bguest
bguest / 0_reuse_code.js
Created July 1, 2014 13:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@bguest
bguest / gist:5307358
Created April 4, 2013 03:00
~/.pryrc
# Launch Pry with access to the entire Rails stack.
# If you have Pry in your Gemfile, you can pass: ./script/console --irb=pry instead.
# If you don't, you can load it through the lines below :)
rails = File.join Dir.getwd, 'config', 'environment.rb'
if File.exist?(rails) && ENV['SKIP_RAILS'].nil?
require rails
if Rails.version[0..0] == "2"
@bguest
bguest / FbInviteFromGroups.rb
Created October 24, 2012 07:16
Ruby Koala gem script to invite all members of multiple groups to an event
require 'koala'
require 'date'
require 'enumerator'
# create_event permision is needed
access_token ='<access_token>'
groups = ["<group1id>","<group2id>"]
graph = Koala::Facebook::API.new(access_token)
@bguest
bguest / FbInviteFromGroups.rb
Created October 24, 2012 07:15
Ruby Koala gem script to invite all members of multiple groups to an event
require 'koala'
require 'date'
require 'enumerator'
# create_event permision is needed
access_token ='<access_token>'
groups = ["<group1id>","<group2id>"]
graph = Koala::Facebook::API.new(access_token)
@bguest
bguest / SyncButton.md
Created September 10, 2012 22:14
Argument for the sync button

Disclaimer: I'm not defending myself, I don't DJ professionally, I do have a bunch of DJ friends, I'm an engineer and I probably understand the underlying technology better than most "DJ's".

I try not to get dragged into these debates, but I'll wtf, this should be fun. I'm going to try and focus on the meta arguments since getting dragged down into the specific details is mind numbingly boring. Technology will march on, improving your own understanding is what is going to keep you dominant in your field, not trying to shame people into staying stagnant.

Go read Kurt Vonnegut's Player Piano: Technology marches on. It won't stop, and part of the forward march of technology is that it sometimes makes whole professions and whole areas of research obsolete. Thousands of assembly line workers have lost their job to robots that largely build cars on their own. No programmer starts a project in FORTRAN because higher level languages like Ruby and Python have been created. Kodak, once the largest supplier of film is

@bguest
bguest / _form.html.erb
Created July 14, 2011 01:59 — forked from vjm/_form.html.erb
CRUD Devise Example
<%= form_for(@user) do |f| %>
<% if @user.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul>
<% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>