This file contains hidden or 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 'rest-assured' | |
RestAssured::Double.create(fullpath: '/products', content: 'this is content') | |
--- | |
gives me... | |
--- | |
/Users/starls01/.rvm/gems/ruby-1.9.3-p125/gems/activeresource-3.2.3/lib/active_resource/base.rb:588:in `prefix': undefined method `path' for nil:NilClass (NoMethodError) |
This file contains hidden or 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
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative -n 20 |
This file contains hidden or 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
@-moz-document domain("ci-app.int.bbc.co.uk") { | |
#navig, table#viewList, table#header, td#side-panel { | |
display: none; | |
} | |
} | |
@-moz-document domain("confluence.dev.bbc.co.uk") { | |
.menuminwidth0, .page-metadata, .ajs-menu-bar { | |
display: none !important; | |
} |
This file contains hidden or 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
// ==UserScript== | |
// @name Olympic Screen | |
// @namespace http://bbc.co.uk | |
// @include https://ci-app.int.bbc.co.uk/hudson/view/Olympics%202012%20Data%20Screen/ | |
// ==/UserScript== | |
var $; | |
// Add jQuery | |
(function(){ |
This file contains hidden or 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 'formula' | |
class Mysql51 < Formula | |
homepage 'http://dev.mysql.com/doc/refman/5.1/en/' | |
url 'http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.58.tar.gz' | |
md5 'ae5aef506088e521e4b1cc4f668e96d2' | |
depends_on 'readline' | |
def options |
This file contains hidden or 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
# Requires pyechonest | |
import urllib | |
from pyechonest import config | |
from pyechonest import track | |
config.ECHO_NEST_API_KEY = "YOUR_API_KEY_HERE" | |
stations = { | |
'Fun Kids': 'http://media-ice.musicradio.com:80/FunKidsMP3Low', |
This file contains hidden or 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 re | |
import mechanize | |
LIBRARY_CARD_NO = '12345678' | |
PIN_NO = '0000' | |
br = mechanize.Browser() | |
br.open("http://catalogue.library.manchester.ac.uk/") | |
br.follow_link(text="My Account", nr=1) |
This file contains hidden or 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: | |
echo "I have ".return_indefinitearticle("apple")." apple, and ".return_indefinitearticle("slice of bread")." slice of bread."; | |
function return_indefinitearticle($thing) { | |
return (preg_match('/^[aeiou]|s\z/i', strtolower($thing))) ? "an" : "a"; | |
} | |
?> |
This file contains hidden or 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 dns.resolver | |
r = dns.resolver.get_default_resolver() | |
try: | |
ans = r.query('0.cec1.c189.ce1.dab.radiodns.org', 'CNAME') | |
print 'CNAME', ans[0].target | |
except NoAnswer: | |
print 'No answer' |
This file contains hidden or 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
# Without VPN | |
localhost:~ sam$ nslookup | |
> set type=srv | |
> 09580.c586.ce1.fm.radiodns.org | |
Server: 10.0.0.138 | |
Address: 10.0.0.138#53 | |
Non-authoritative answer: | |
*** Can't find 09580.c586.ce1.fm.radiodns.org: No answer |