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
% ab -n 10 -c 10 -p json.file -T "application/json; charset=utf-8" http://localhost/ |
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
ktremotetest bulk -th 4 -bin -bulk 1 10000 > benchmark.log |
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
# -*- coding: utf-8 -*- | |
import unittest | |
import StringIO | |
class StreamTestCase(unittest.TestCase): | |
def test_something(self): | |
output = StringIO.StringIO() | |
output.write("Lorem ") | |
output.write("Ipsum") | |
self.assertEquals(output.getvalue(), "Lorem Ipsum") |
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
diff --git a/github-growler.pl b/github-growler.pl | |
index bc37fea..4b4b430 100755 | |
--- a/github-growler.pl | |
+++ b/github-growler.pl | |
@@ -258,14 +257,12 @@ sub get_user { | |
$Cache->("user:$name", sub { | |
my $cb = shift; | |
- http_get "http://github.com/api/v2/json/user/show/$name", persistent => 0, sub { | |
+ http_get "https://api.github.com/users/$name", persistent => 0, sub { |
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
type Church a = (a -> a) -> (a -> a) | |
curch::Integer -> Church Integer | |
curch 0 = \f -> \x -> x | |
curch n = \f -> \x -> f(curch(n-1) f x) | |
unchurch :: Church Integer -> Integer | |
unchurch n = n(\x -> x + 1) 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
$od -i hoge| awk '{print $2,$3,$4,$5}' | spark | |
▇▅▄▆▄▁▁▁▁▄▁▄▄▄▄▄▅▄▄▁▁▅▁▄▄▅▂▁▅▂▄▄▁▂▄▅▇▆▁▂▅▃▁▆▆▅▁▆▃▃▆▂▆▄▂▄▆▇▃▄▄▄▆▁▁▁▃▃▂▅▂▂▂▄▃▂▃▂▆▃▇▆▄▃▆▅▆▄▅▁▂▆▄▂▃▂▁▄▄▇▆▁▇▅▄▃▄▃▂▄▁▃▁▁▁▁▃▅▄▆▃▁▇▅▂▆▅▄▄▆▁▁▄▇▅▄▄▂▆▄▇▆▄▅▂▆▁▁▅▂▃▂▇▁▇▄▆▅▅█▁▄▇▇▄▇▂▄▂▇▅▄▆▃▇▅▆▁▆▅▄▇▅▁▇▁▂▁▃▁▅▁▇▄▁▄▅▄▄▆▄▅▇▅▅▅▅▄▁▄▁▅▄▁▄▁▄▄▆▄▅▅▃▆▁▂▄▁▃▂▇▅▂▇▃▂▁▄▂▅▁▂▅▄▂▂▅▅▆▆▄▆▁▇▇▇▅▇▅▅▃▇▄▆▁▂▇▂▇▅▃▆▅▃▂▄▃▇▁▁▁▃▄▄▂▅▃▂▄▂▄▅▆▂▂▇▁▃▂▅▅▃▃▅▅▆▇▇▇▂▂▄▆▆▂▂▃▆▁▄▁▆▂▇▇▇▆▅▃▅▇▂▂▅▄▇▂▆▄▅▁▅▆▅▂▅▅▂▄▁▆▅▂▃▄▄▄▅▅▇▁▆▇▇▅▂▇▆▂▁▁▃▁▁▄▄▃▇▂▂▁▇▇▅▁▄▆▆▁▆▃▄▇▂▄▅▅▅▅▅▅▄▄▅▂▃▅▄▂▆▂▄▄ |
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
#start repl | |
%ng vimclojure.Nail Repl -s | |
{"value" : {"id" : 4}, "stdout" : "", "stderr" : ""} | |
#send expression to ng-server | |
%ng vimclojure.Nail Repl -r -i 4 | |
(+ 1 2)^D | |
{"value" : 0, "stdout" : "3\n", "stderr" : ""} |
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
[alias] | |
co = checkout | |
st = status | |
ci = commit -a | |
di = diff | |
br = branch | |
stat = log --stat --summary | |
logg = log --graph --decorate --pretty=format:\"%ad [%cn] %h> %n %Cgreen%d%Creset %s %n\" --name-status | |
logs = log --graph --decorate --pretty=format:\"%ad [%cn] %h> %n %Cgreen%d%Creset %s %n\" --stat |
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
#!/bin/sh | |
SRCDIR="original/" | |
DESTDIR="resized/" | |
if [ ! -d "resized" ]; | |
then | |
mkdir resized | |
fi |
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
//SEE: http://stackoverflow.com/questions/2916348/using-moq-to-set-indexers-in-c-sharp | |
[TestMethod] | |
public void IndexTest() | |
{ | |
var mockHttpContext = new Mock<HttpContextBase>(); | |
var mockSession = new Mock<HttpSessionStateBase>(); | |
mockHttpContext.Setup(context => context.Session).Returns(mockSession.Object); | |
AppHttpContext.Current = () => mockHttpContext.Object; | |
var controller = new HomeController(); |