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
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=- /home/kubicek/margin.ps - | /usr/local/libexec/tray_select.rb -L | |
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
import sys, os, optparse, re | |
def die(msg): | |
print >>sys.stderr, '%s: %s' % (sys.argv[0], msg) | |
sys.exit(1) | |
def getParser(): | |
parser = optparse.OptionParser( | |
usage='%prog [OPTIONS] DIR', | |
description='Allow restricted git operations under DIR', |
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
users: | |
kubicek: | |
repositories: | |
- "xnet/superstudent.git" | |
- "xnet/aukce.git" |
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
class KubicekMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
#tohle se vola pred aplikaci | |
env["REQUEST_URI"]="/welcome" | |
#zavolame aplikaci | |
status, headers, response = @app.call(env) |
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
#!/usr/bin/env ruby | |
# | |
# Based on drbfs example by Kent Sibilev | |
require 'lib/fusefs' | |
# We're basically just passing all requests on to the local filesystem. | |
class UfsDirectory | |
def initialize(dir) | |
@dir = dir |
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
class Performer | |
attr_accessor :object, :method_to_call, :parameters_for_method | |
def initialize(object, method_to_call, *parameters_for_method) | |
@object, @method_to_call, @parameters_for_method = object, method_to_call, parameters_for_method | |
end | |
def perform | |
object.send(method_to_call, *parameters_for_method) |
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
Požadavek: Znovunastavení hesla | |
Pro přihlášení v případě zapomenutého hesla | |
Uživatel | |
By měl mít možnost si heslo znovu nastavit | |
Scénář: Uživatel není zaregistrován | |
Pokud neexistuje uživatel s emailovou adresou "email@person.com" | |
Když požádám o zaslání odkazu pro znovunastavení hesla na "email@person.com" | |
Pak bych měl vidět "Neznámý e-mail." |
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
# Usage: | |
# rails project_name -m http://gist.github.com/127877.txt |
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
Pokud /^jsem na (.+)$/ do |page_name| | |
Given "I am on #{page_name}" | |
end | |
Když /^jdu na (.+)$/ do |page_name| | |
When "I go to #{page_name}" | |
end | |
Když /^zmáčknu "([^\"]*)"$/ do |button| | |
When "I press \"#{button}\"" |
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
require 'rubygems' | |
require 'eventmachine' | |
require 'dnsruby' | |
module RedirectServer | |
def receive_data data | |
send_data <<EOF | |
HTTP/1.1 301 Moved Permanently | |
Location: http://www.daukce.cz/ | |
Content-Type: text/html |