Skip to content

Instantly share code, notes, and snippets.

@debreczeni
debreczeni / Mysql2 gem mac os x.6 fix
Created May 9, 2011 11:48
Mysql2 gem mac os x.6 fix
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
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
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(-)
@debreczeni
debreczeni / annotate header regex test
Created November 18, 2011 15:43
annotate header regex test
/^#[\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
@debreczeni
debreczeni / gist:1383786
Created November 21, 2011 20:14
how to install edge refinery cms for rails 3.1:

how to install edge refinery cms for rails 3.1:

install rail 3.1

gem install rails

generate new app from refinerycms github repo

rails new app_name -m https://raw.github.com/resolve/refinerycms/master/templates/refinery/edge.rb
@debreczeni
debreczeni / rspec-syntax-cheat-sheet.rb
Created January 5, 2012 18:17 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@debreczeni
debreczeni / git-show-big-files.sh
Created May 2, 2012 16:41
Find large files in git repository
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
@debreczeni
debreczeni / git-show-big-files.sh
Created May 10, 2012 12:19
This shell script displays large file in a git repository
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
@debreczeni
debreczeni / search_29ers_on_bikemag_apro.rb
Last active December 19, 2015 04:08
search for 29er mountain bikes on apro.bikemag.hu
#!/usr/bin/env ruby
require 'mechanize'
# require 'awesome_print'
# require 'pry-debugger'
class TwentyNiner
def initialize
@index_page_url = 'http://apro.bikemag.hu/browse/mountain-bike/mtb-kerekpar/'
@wheel_size = /29/
// csikozas
#virtuall > tbody > tr.alt2 > td:nth-of-type(2) { background:#B6D8F5; }
// tabla kerekites
#virtuall { border-collapse:separate; }
#virtuall td, #virtuall th { border:1px solid #000000; border-width: 1px 1px 0 0;}
#virtuall tr:first-child th:first-child { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; border-top-left-radius: 10px; }
#virtuall tr:first-child th:last-child { -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; border-top-right-radius: 10px; }
#virtuall tr:last-child td:first-child { -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; }
#virtuall tr:last-child td:last-child { -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; }