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
public string SomeMethod(int value) | |
{ | |
return (value + 2).ToString(); | |
} | |
public string SomeMethod2(int value) | |
{ | |
return (value + 3).ToString(); | |
} |
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
Number.prototype.times = function(f) { | |
for(var i =0; i < this; ++i) { | |
f(); | |
} | |
return this; | |
}; | |
10.times(function() { console.log("mark"); }); | |
> SyntaxError: missing ; before statement |
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
Playing with some code to understand overriding. | |
This works: | |
function Foo() {} | |
Foo.prototype = { | |
bar : function() { | |
console.log("original bar"); | |
} | |
} |
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
Array.prototype.foldLeft = function(seed, f) { | |
var accumulation = seed; | |
for(var i=0; i < this.length; ++i) { | |
accumulation = f(accumulation, this[i]); | |
} | |
return accumulation; | |
} | |
Number.prototype.times = function(f) { |
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
Screw.Unit(function() { | |
describe("bowling game scorecard", function() { | |
var bowlingGame; | |
before(function() { | |
bowlingGame = new BowlingGame(); | |
}); | |
function gutterBall() { | |
bowlingGame.roll(0); |
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
mneedham@markneedham.local ~/SandBox$ ssh -v mneedham@github.com | |
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006 | |
debug1: Reading configuration data /etc/ssh_config | |
debug1: Connecting to github.com [207.97.227.239] port 22. | |
debug1: Connection established. | |
debug1: identity file /Users/mneedham/.ssh/identity type -1 | |
debug1: identity file /Users/mneedham/.ssh/id_rsa type 1 | |
debug1: identity file /Users/mneedham/.ssh/id_dsa type 2 | |
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2 | |
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH* |
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
mneedham@markneedham.local ~/SandBox$ ssh -v git@github.com | |
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006 | |
debug1: Reading configuration data /etc/ssh_config | |
debug1: Connecting to github.com [207.97.227.239] port 22. | |
debug1: Connection established. | |
debug1: identity file /Users/mneedham/.ssh/identity type -1 | |
debug1: identity file /Users/mneedham/.ssh/id_rsa type 1 | |
debug1: identity file /Users/mneedham/.ssh/id_dsa type 2 | |
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2 | |
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH* |
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
debug1: channel 0: free: client-session, nchannels 1 | |
Read from remote host github.com: Operation timed out | |
Connection to github.com closed. | |
Transferred: sent 2832, received 2616 bytes, in 511.7 seconds | |
Bytes per second: sent 5.5, received 5.1 | |
debug1: Exit status -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
mneedham@markneedham.local ~/SandBox$ touch /tmp/blank-config; ssh -v -f /tmp/blank-config -i ~/.ssh/id_rsa git@github.com | |
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006 | |
debug1: Reading configuration data /etc/ssh_config | |
ssh: Could not resolve hostname /tmp/blank-config: nodename nor servname provided, or not known |
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
mneedham@markneedham.local ~/SandBox$ touch /tmp/blank-config; ssh -v -F /tmp/blank-config -i ~/.ssh/id_rsa git@github.com | |
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006 | |
debug1: Reading configuration data /tmp/blank-config | |
debug1: Connecting to github.com [207.97.227.239] port 22. | |
debug1: Connection established. | |
debug1: identity file /Users/mneedham/.ssh/id_rsa type 1 | |
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2 | |
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH* | |
debug1: Enabling compatibility mode for protocol 2.0 | |
debug1: Local version string SSH-2.0-OpenSSH_5.1 |