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
# file: /etc/xinet.d/identd-spoof | |
service identd-spoof | |
{ | |
socket_type = stream | |
protocol = tcp | |
user = root | |
wait = no | |
server = /home/torgeir/bin/identd-spoof | |
flags = IPv6 |
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
# put vmware in "Bridged" mode | |
# open your windows firewall ("everyone" seems to be windows-locale specific, so you might have to use something else for windowses not in english) | |
netsh http add urlacl url=http://*:53843/ user=everyone | |
netsh advfirewall firewall add rule name="iisexpress port" dir=in action=allow protocol=TCP localport=53843 | |
# find the following line in ~/Documents/IISExpress/config/applicationhost.config for your app | |
<binding protocol="http" bindingInformation="*:53843:localhost" /> | |
# add the following line below it with the ip from running ipconfig |
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
# after changing the version (e.g. a roll back) of a version of a nuget package, e.g. RestSharp, run | |
Update-Package -Reinstall RestSharp -ProjectName ProjectName | |
# clean | |
# rebuild |
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
// http://hotell.difi.no/?dataset=ssb/regioner/kommuner | |
public class Kommune { | |
public string Nummer { get; private set; } | |
public string Navn { get; private set; } | |
public Kommune(string nummer, string navn) { | |
Nummer = nummer; | |
Navn = navn; |
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
<!doctype html> | |
<meta charset=utf-8> | |
<title>tests</title> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/chai/2.0.0/chai.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.1.0/mocha.js"></script> | |
<script> | |
var m = new Mocha({ ui: 'bdd' }); | |
var context = {}; | |
m.suite.emit('pre-require', context, null, m); |
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
var lens = function (get, set) { | |
var f = function (value) { return get(value); }; | |
f.set = set; | |
return f; | |
}; | |
var first = lens( | |
function (value) { return value[0]; }, | |
function (value, n) { return [n].concat(value.slice(1)); }); |
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
function Map (f, form) { | |
this.f = f; | |
this.form = form; | |
} | |
Map.prototype = { | |
'@@transducer/init': function () { | |
return this.form['@@transducer/init'](); | |
}, | |
'@@transducer/step': function (acc, v) { | |
return this.form['@@transducer/step'](acc, this.f(v)); |
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
const comp = (...fns) => v => fns.reduce((acc, fn) => fn(acc), v); | |
const inc = x => v => v + x; | |
const incOne = inc(1); | |
const log = console.log.bind(console); | |
log([1, 2, 3].reduce((acc, v) => { | |
acc.push(incOne(v)); |
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
package gd.wa; | |
import akka.actor.ActorRef; | |
import akka.actor.ActorSystem; | |
import akka.actor.Props; | |
import akka.actor.UntypedActor; | |
import akka.pattern.Patterns; | |
import akka.util.Timeout; | |
import scala.concurrent.Future; | |
import scala.concurrent.duration.FiniteDuration; |
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
package gd.wa; | |
public class Result { | |
public final int value; | |
public Result(int value) { | |
this.value = value; | |
} |