Skip to content

Instantly share code, notes, and snippets.

@mbuckbee
mbuckbee / boingboing_title_exporter.rb
Created January 31, 2011 07:06
Parses the BoingBoing JSON data dump pulling post titles and writing them to a new file.
require 'rubygems'
require 'yajl'
file = File.new('bbPosts.json', 'r') # file with more than one json
# Boing Boing Titles
parser = Yajl::Parser.new
parser.parse(file) do |file|
file.each do |post|
@mbuckbee
mbuckbee / nginx.conf
Created January 4, 2011 10:09
Wordpress with a Rails subdirectory
server {
listen 80;
server_name www.wordpress-domain-name.com;
root /var/www/wordpress;
index index.php;
try_files $uri $uri/ /index.php;
location /rails {
passenger_min_instances 2;
@mbuckbee
mbuckbee / QRCoding.html
Created December 19, 2010 19:34
How to Add a Secret QR Code to your blog posts
<!-- Place in your header after your current CSS declarations -->
<style type="text/css" media="screen">
#qrcode{display: none;}
</style>
<style type="text/css" media="print">
#header, #sidebar, #respond, .social-bar, .author-links, #footer, #comments{display: none;}
#qrcode{display: block;}
@mbuckbee
mbuckbee / deepsearch.rb
Created December 11, 2010 20:08
Deep search a single twitter users's history.
require 'rubygems'
require 'twitter'
require 'json'
require 'net/http'
def term_search(screen_name, needle)
(0..9999999).each do |i|
puts "Page #{i} Search"