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 <Cocoa/Cocoa.h> | |
@interface RBAppDelegate : NSObject <NSApplicationDelegate> | |
{ | |
NSStatusItem *systemStatusItem; | |
} | |
@end |
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
function loadAd(url, div) { | |
function makeAdParser(el, cb) { | |
var inNoScriptTag = false; | |
var parser = function(txt) { | |
txt = txt.trim(); | |
if(txt === '</noscript>') { inNoScriptTag = false; return; } | |
if(txt === '<noscript>') { inNoScriptTag = true; return; } | |
if(inNoScriptTag) { return; } |
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
# encoding: UTF-8 | |
require 'open-uri' | |
require 'uri' | |
def finn(id) | |
doc = open("http://www.finn.no/finn/realestate/homes/object?finnkode=#{id}").read | |
doc =~ /helios_parameters\s?:\s?'(.*)'/ | |
attrs = $1.split(';').inject({}) do |mem, e| | |
key, value = e.split "=" |
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
// Extend Backbone.Model to support setting a namespace | |
// for models. Example response from server: | |
// { | |
// 'modelname' : { | |
// ... attributes ... | |
// } | |
// We dont want the attributes to be scoped by the model name | |
// in the models attributes property. This new parse function | |
// will drop the namespace if it is defined on the model. | |
// Example: |
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
// SVGCanvas.prototype.transform = SVGCanvas.prototype.translate; | |
// SVGCanvas.prototype.fillText = SVGCanvas.prototype.text; | |
paper.View.prototype.toSVG = function() { | |
var svgContext = new SVGCanvas(this.canvas.width, this.canvas.height); | |
var oldCtx = this._context; | |
this._context = svgContext; | |
this.draw(false); |
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 'bundler/setup' | |
require 'mechanize' | |
class Device | |
attr_accessor :name, :uuid, :id | |
end | |
class ProvisioningPortal | |
attr_reader :connection | |
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
module MLS | |
extend self | |
GRID = ("A".."R").to_a | |
SQUARE = ("0".."9").to_a | |
SUB = ("a".."x").to_a | |
deg = 180.0 | |
PARTS = [[18, GRID], [10, SQUARE], [24, SUB], [10, SQUARE]] | |
PARTS.map! { |div, part| [deg = deg / div, part] } |
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
# An attempt at visualising classbox local rebinding as described in | |
# http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.3.4133&rep=rep1&type=pdf | |
# | |
# Suppose a classbox ClassBox1 defines a class C with two methods, m callin n, and | |
# classbox ClassBox2 imports C from ClassBox1 and replaces n. We say that… | |
class C;end | |
module ClassBox1 | |
refine C do |
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
/* Generell plagsomhet */ | |
.skattesok2009 {display: none!important;} | |
#solBox {display: none!important;} | |
#header {display:none!important;} | |
div.ad {display: none!important;} | |
#ad-top {display: none!important;} | |
div#topp-ad {display: none!important;} | |
#tvguide .head {display: none!important; } | |
iframe {display: none!important;} | |
#footerwrapper {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
nb: | |
activemodel: | |
errors: | |
messages: | |
taken: er allerede i bruk | |
mongoid: | |
errors: | |
messages: | |
document_not_found: |