Skip to content

Instantly share code, notes, and snippets.

View pepe's full-sized avatar

Josef Pospíšil pepe

View GitHub Profile
user app;
worker_processes 2;
error_log /home/app/logs/nginx.error.log info;
events {
worker_connections 1024;
}
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
# Add this to more_web_steps.rb
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
alert.send(action)
end
@pepe
pepe / gist:947959
Created April 29, 2011 06:54
CityHash on MacOS X with ruby 1.9.2 from rvm
>> require 'cityhash'
LoadError: Could not open library '/Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/cityhash-0.4.0/lib/cityhash/ext/libcity.so': dlopen(/Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/cityhash-0.4.0/lib/cityhash/ext/libcity.so, 5): no suitable image found. Did find:
/Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/cityhash-0.4.0/lib/cityhash/ext/libcity.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00
from /Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/ffi-1.0.7/lib/ffi/library.rb:75:in `block in ffi_lib'
from /Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/ffi-1.0.7/lib/ffi/library.rb:54:in `map'
from /Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/ffi-1.0.7/lib/ffi/library.rb:54:in `ffi_lib'
from /Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/cityhash-0.4.0/lib/cityhash.rb:11:in `<module:Internal>'
from /Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/cityhash-0.4.0/lib/cityhash.rb:8:in `<module:CityHash>'
from /Users/pepe/.rvm/gems/ruby-1.9.2-p180/gems/cityhash-0.4.0/lib/cityhash.rb:3
@pepe
pepe / dr-ape.rb
Created April 29, 2011 08:58
Dr.Ape issues
require "rubygems"
require "sinatra"
require "net/http"
require "net/https"
require "uri"
get "/:status?" do
erb :index
end
@pepe
pepe / create_picka.rb
Created May 6, 2011 08:47
Skript na vytvoření studenta pícky
s=Student.new
s.firstname="Marek"
s.lastname="Pícka"
s.title_before_id=1
s.save
i=Index.new
i.student=s
i.department_id=25
i.specialization_id=1004
@pepe
pepe / my-gh-issues.rb
Created May 9, 2011 07:11 — forked from copiousfreetime/my-gh-issues.rb
My Github Issues
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'
# encoding: UTF-8
Before do
FontRenderer.stub!(:render_user_text).and_return(true)
FontRenderer.stub!(:render_tester_text).and_return(true)
end
Given /^I visit the home page$/ do
visit '/'
end
@pepe
pepe / Gemfile.lock
Created May 16, 2011 13:56
padrino reload issue
GIT
remote: git://github.com/LastStar/ft2-ruby
revision: 5f5b74959711feb1d0f9b2151871087375ddffd5
specs:
ft2-ruby (0.1.3)
GIT
remote: git://github.com/LastStar/glyphr
revision: 5e143f37ebc686c669ed390012a3073c9f8dcd50
specs:
=> Located locked Gemfile for development
DEBUG - [16/May/2011 19:01:19] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/config/database.rb"
DEBUG - [16/May/2011 19:01:19] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/lib/download_uploader.rb"
DEBUG - [16/May/2011 19:01:19] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/lib/font_renderer.rb"
DEBUG - [16/May/2011 19:01:19] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/lib/image_uploader.rb"
DEBUG - [16/May/2011 19:01:19] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/lib/license_multiplier.rb"
DEBUG - [16/May/2011 19:01:20] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/lib/text_generator.rb"
DEBUG - [16/May/2011 19:01:20] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/lib/uploader.rb"
DEBUG - [16/May/2011 19:01:20] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/app/models/address.rb"
DEBUG - [16/May/2011 19:01:20] "Loaded /Users/pepe/Projects/fun/suitcasetype.com/app/models/contact.rb"