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/bash | |
COUNTER=0 | |
while [ $COUNTER -lt 10 ]; do | |
clear | |
coffee --compile --output js-out --watch . | |
done |
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
-module(streaming). | |
-export([stream_data/1, out/1, stream_from_file/3]). | |
out(_Arg) -> | |
_Pid = spawn_link(?MODULE, stream_data, [self()]), | |
{streamcontent, "audio/mp3", <<>>}. | |
stream_data(Pid) -> | |
File = "/home/erlang/erlang-talk/audio.mp3", | |
FileHDL = open_file(File), | |
stream_from_file(Pid, FileHDL, 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
_.chain([1,2,3,4,5,6,7,8]) | |
.filter((x) -> x > 3) | |
.map((x) -> x * x) | |
.map((x) -> x + 1) | |
.value() #> [17, 26, 37, 50, 65] |
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
_.filter([1,2,3,4], is_even) #> [2,4] |
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
_.any([1,2,3,4], function (x) {return x % 2 === 0;}); | |
_.all([1,2,3,4], function (x) {return x % 2 === 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>QUnit Example</title> | |
<link rel="stylesheet" href="/resources/qunit.css"> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<script src="/resources/qunit.js"></script> |
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
test( "hello test", function() { | |
ok( 1 == "1", "Passed!" ); | |
}); |
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
module("group a") | |
test( "hello test", function() { | |
ok( 1 == "1", "Passed!" ); | |
}); | |
module("group b") | |
test( "Goodbye Test", function() { | |
//.... | |
}); |
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
test("AjaxTest", function () | |
stop() | |
$.ajax({ | |
success: function (Result) | |
start() | |
equal(ExpectedResult, Result) | |
})) |
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
test("AjaxTest", function () | |
expect(1) | |
stop() | |
$.ajax({ | |
success: function (Result) | |
start() | |
equal(ExpectedResult, Result) | |
})) |