View annotate header regex test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^#[\t ]+\w+[\t ]+(?:(?::\w+)|(?:\([\w,]+\)(?:[\t ]+\w+)?))(?:[\t ]+[\w, ]+)?$/ | |
# == Schema Information | |
# | |
# Table name: programmes | |
# | |
# id :integer not null, primary key | |
# starts_at :datetime not null | |
# show_id :integer not null | |
# created_at :datetime |
View Azt-szeretem-a-Padrinoban--hogy-letisztult---.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 3856f4121b5e60531572873d64335660ea42c1a6 Mon Sep 17 00:00:00 2001 | |
From: David Debreczeni <david.debreczeni@gmail.com> | |
Date: Thu, 18 Aug 2011 13:53:21 +0200 | |
Subject: [PATCH] Azt szeretem a Padrinoban, hogy letisztult... | |
--- | |
config/boot.rb | 22 ++++++++++++++++++++++ | |
results/app.rb | 2 +- | |
2 files changed, 23 insertions(+), 1 deletions(-) |
View gist:1104437
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT `people`.* FROM `people` WHERE `people`.`deleted_at` IS NULL AND (`people`.`country_id` = 16777217) AND (id IN (SELECT DISTINCT person_id FROM people_sections WHERE people_sections.deleted_at IS NULL AND section_id IN (SELECT DISTINCT section_id FROM event_types WHERE event_types.deleted_at IS NULL AND event_types.id IN (SELECT DISTINCT event_type_id FROM events WHERE events.deleted_at IS NULL AND competition_id = 16777237)))) AND ((people.lastname LIKE '%gabriella%' or people.firstname LIKE '%gabriella%')) AND ((people.lastname LIKE '%szabo%' or people.firstname LIKE '%szabo%')) LIMIT 100 |
View Mysql2 gem mac os x.6 fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install mysql2 --version 0.2.6 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config | |
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib ~/.rvm/gems/ruby-1.8.7-p334@sportline/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle |
View database_cleaner.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/database_cleaner.rb | |
def restore_clean_db_state! | |
DatabaseCleaner.clean_with :truncation | |
# load Rails.root.join('db', 'seeds.rb') | |
RSpec.configuration.db_is_dirty = false | |
end | |
def start_transaction! | |
DatabaseCleaner.strategy = :transaction |
View gist:805d420df70f1c377510
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# infinity symbol | |
fill_color(card_color) | |
if(render_infinity) | |
fill_color(card_color) | |
x, y = width / 2, height * (barcode_height_ratio + 0.15) | |
s = width / 6 | |
m = s / 2 | |
n = m/2 | |
move_to [x, y - n/2] | |
curve_to [x + s / 4, y - m/2], :bounds => [[x + n / 5 * KAPPA, y - (m/2)*KAPPA], [x + (s / 4) * (1-KAPPA), y - m/2]] |
NewerOlder