Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<canvas id="canvas" width="480" height="340"></canvas>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<canvas id="canvas" width="480" height="340"></canvas>
</body>
</html>
digraph{
graph[rankdir=LR];
A -> B -> D;
C -> D;
D -> E -> G;
D -> F -> G;
}
digraph{
A -> B;
A -> E;
A -> C;
B -> C [color=red];
C -> D [color=red];
D -> B [color=red];
E -> B;
E -> D;
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<input type="button" value="くりっく" id="btn">
<div id="output">
</div>
fn main(){
println!("Hello, World!");
}
fn main(){
let mut count = 0;
while count < 10 {
let c = count;
let p = proc(){
println!("Hello World from No. {}", c);
};
spawn(p);
count = count + 1;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<input type="button" value="start" id="start">
<input type="button" value="stop" id="stop">
<audio id="output" controls>
#!/usr/bin/env ruby
pattern = /^(?:(?:(?:(?:[a-zA-Z0-9_!#\$\%&'*+\/=?\^`{}~|\-]+)(?:\.(?:[a-zA-Z0-9_!#\$\%&'*+\/=?\^`{}~|\-]+))*)|(?:"(?:\\[^\r\n]|[^\\"])*")))\@(?:(?:(?:(?:[a-zA-Z0-9_!#\$\%&'*+\/=?\^`{}~|\-]+)(?:\.(?:[a-zA-Z0-9_!#\$\%&'*+\/=?\^`{}~|\-]+))*)|(?:\[(?:\\\S|[\x21-\x5a\x5e-\x7e])*\])))$/
table = {}
open(ARGV.shift) do |fd|
fd.each do |line|
date, mail = line.split(/,/)
table[mail] = date if mail =~ pattern
@chikoski
chikoski / app.js
Created June 29, 2014 07:33
alarmtest.app
(function(){
document.querySelector("#start").addEventListener("click", function(event){
var now = new Date();
var due = new Date(now.valueOf() + 10000);
console.log("now = " + now);
console.log("due = " + due);
navigator.mozSetMessageHandler("alarm", function (message) {
console.log("alarm fired");
});