Skip to content

Instantly share code, notes, and snippets.

View n3bulous's full-sized avatar

Kevin McFadden n3bulous

View GitHub Profile
require 'rubygems'
require 'net/http'
require 'hpricot'
require 'feed-normalizer'
require 'simple-rss'
require 'open-uri'
require 'sqlite3'
#require 'ActiveRecord'
#require File.dirname(__FILE__)+'/models/feed'
require 'rubygems'
require 'net/http'
require 'hpricot'
require 'feed-normalizer'
require 'simple-rss'
require 'open-uri'
require 'sqlite3'
#require 'ActiveRecord'
#require File.dirname(__FILE__)+'/models/feed'
>> require 'rubygems'
=> true
>> require 'feed-normalizer'
=> true
>> puts DECLARATION
NameError: uninitialized constant DECLARATION
from (irb):3
from :0
>> require 'rexml/Document'
/opt/local/lib/ruby/1.8/rexml/Document.rb:25: warning: already initialized constant DECLARATION
#!/bin/env bash
# git-create-branch <branch_name>
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 branch_name
exit 127
fi
branch_name=$1
git push origin origin:refs/heads/${branch_name}
@n3bulous
n3bulous / geokit_config.rb
Created March 10, 2011 04:16
monkey patching geokit to support google premier
# Monkey Patch to enable google premier
module Geokit
module Geocoders
@@google_client_id = nil
__define_accessors
class GoogleGeocoder
private
def self.do_geocode(address, options = {})
bias_str = options[:bias] ? construct_bias_string_from_options(options[:bias]) : ''
@n3bulous
n3bulous / un_haml.rb
Created June 27, 2011 16:12 — forked from kamali/gist:550231
switch haml to erb
## based on the example at:
## http://gist.github.com/17371
##
## put me in lib/un_haml.rb (in the haml-based project)
##
## call me on the command line thus:
## $ script/runner UnHaml app/views/layouts/application.html.haml
## $ script/runner UnHaml */*/*/*.haml
##
class UnHaml < Haml::Engine
@n3bulous
n3bulous / gist:1917833
Created February 26, 2012 17:19
n3bulous' frankentheme
# ZSH Theme - Preview:
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
local rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v)›%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'
PROMPT="╭─ ${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
╰─ %B%! %* $%b "
@n3bulous
n3bulous / mapreduce2mysqlimport.rb
Created April 4, 2012 21:40
Processing Map Reduce Output by Line (first draft)
#!/usr/bin/env ruby
require 'slop'
require 'aws/s3'
class FileProcessor
def initialize(file_path)
@file_path = file_path
end
// ==UserScript==
// @name GitHub delete all notifications button
// @namespace http://www.github.com/micolous/delete-all-notifications
// @description Adds a button to allow you to delete all notifications on a page.
// @include http://github.com/inbox/notifications*
// @include https://github.com/inbox/notifications*
// ==/UserScript==
/*
@n3bulous
n3bulous / gist:3105047
Created July 13, 2012 14:03 — forked from reagent/gist:3100660
Open Conference Expectations

Open Conference Expectations

LOL