Skip to content

Instantly share code, notes, and snippets.


Stefan Rohlfing bytesource

View GitHub Profile
bytesource / csv_parser_csv_gem_benchmark.rb
Created September 4, 2011 03:47
Simple CSV Parser vs. CSV Gem Benchmark
View csv_parser_csv_gem_benchmark.rb
require 'open-uri'
require 'nokogiri'
require 'parslet'
require 'csv'
# --------------------------------------------------
# Auxiliary code
class String
View group_by_date_problem.rb
# Sequel Google Groups
# Topic:!topic/sequel-talk/WlgsyLtd9eE
require 'sequel'
require 'logger'
require 'date'
# Connection
# =============
View acf_repeater_output_oxygen_reusable_part.php
// 13: Post ID of the page the repeater is located on
if( have_rows('questions_and_answers', 13) ):
// loop through the rows of data
while ( have_rows('questions_and_answers', 13) ) : the_row();
// display a sub field value
//193: Post ID of reusable part template
bytesource / tweetclone_sequel.rb
Created November 19, 2012 14:06
"Tweetclone" Twitter clone using Sequel (database schema taken from "Cloning Internet Applications with Ruby")
View tweetclone_sequel.rb
require 'sequel'
require 'logger'
# CONNECTION ================================
DB = Sequel.connect(ENV['DATABASE_URL'] ||'postgres://postgres:password@localhost/tweetclone')
# Logging SQL Queries
DB.loggers <<$stdout)