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
framework "CoreWLAN" | |
iface = CWInterface.interface | |
iface.disassociate | |
wlans = iface.scanForNetworksWithParameters(nil, error: nil) | |
wlan = wlans.find {|w| w.ssid == "WLAN_724A"} | |
p [wlan.bssid, wlan.ssid, wlan.securityMode, wlan.wlanChannel.channelNumber] | |
keys = File.read("./dictionary.txt").lines.to_a.reverse |
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
Feature: Provider billing mode on | |
In order to bill active users | |
As a buyer | |
I don't want to be billed when I'm not active | |
Background: | |
Given the date is 10th January 2011 | |
Given a provider "xyz.example.com" with billing enabled | |
And an application plan "Fixed" of provider "xyz.example.com" for 100 monthly |
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
; <<>> DiG 9.7.3-P3 <<>> +trace developer.maxdome.de | |
;; global options: +cmd | |
. 60 IN NS e.root-servers.net. | |
. 60 IN NS f.root-servers.net. | |
. 60 IN NS g.root-servers.net. | |
. 60 IN NS h.root-servers.net. | |
. 60 IN NS i.root-servers.net. | |
. 60 IN NS j.root-servers.net. | |
. 60 IN NS k.root-servers.net. |
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
; <<>> DiG 9.7.3-P3 <<>> developer.maxdome.de | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26621 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;developer.maxdome.de. IN A | |
;; ANSWER SECTION: |
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
# Set Apple Terminal.app resume directory | |
if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then | |
autoload -U add-zsh-hook | |
function lion_resume_chpwd { | |
# add support for OS X Lion window resume on Terminal.app relaunch | |
# straight port from /etc/bashrc on Lion | |
local SEARCH=' ' | |
local REPLACE='%20' | |
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}" |
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
module Reloader | |
def run_callbacks(*args) | |
case args.first.to_sym | |
when :prepare | |
# allow call to ActionDispatch.prepare! | |
# or when source was updated | |
# cleanup before every preload | |
if @app.nil? or changed? | |
reset! | |
super(:cleanup) |
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
request = require('request') | |
money = require('money') | |
fs = require('fs') | |
arguments = process.argv.splice(2) | |
amount = arguments.shift() | |
try | |
loop | |
base = arguments.shift() |
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
read -s -r -d '' SCRIPT <<"EOF" | |
framework 'ScriptingBridge' | |
rating = ARGV.pop | |
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.itunes") | |
track = itunes.currentTrack | |
track.rating = rating.to_f*20 | |
puts "#{track.artist} - #{track.name} rated #{rating} stars" | |
EOF |
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 'factory_girl/step_definitions' | |
def FactorySingleton(*args) | |
FactorySingleton.find_or_self *args | |
end | |
module FactorySingleton | |
def find_or_self object, attribute = nil | |
# FIXME: instead of this probably could check validation reflection for unique attributes | |
attribute ||= case object |
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 macruby | |
# encoding: utf-8 | |
CALENDARS = ['Michal Cichra', 'Calendar'] # Set names of calendars to show | |
before = 3 # days to show before today | |
after = 10 # days to show after today | |
today = 'dnes' |