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
#!/usr/bin/env perl | |
use strict; | |
use AE;use EV; | |
use Guard; | |
use Time::HiRes; | |
use POSIX 'strftime'; | |
sub ae_loop(&&$$); |
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>Sort</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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 hexdump(s) | |
if type(s) ~= 'string' then | |
error('string required') | |
end | |
local ln = 0 | |
local line = '' | |
local rest = '' | |
local byte | |
for i = 1, #s do | |
if i % 16 == 1 and i > 1 then |
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 smail() { | |
function help() { | |
cat <<EOF | |
smail [option option ...] <addressee> [attachment ...] | |
--from -f mail sender (default is \${USER}@\$?(hostname -f)) | |
--subject -s mail subject (defailt "mail") | |
--test -t don't call sendmail, send result to stdout | |
--help -h print this message and exit | |
EOF | |
} |
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 lang='en'> | |
<head> | |
<meta charset='utf-8' /> | |
<meta name='description' content='JS Chain'> | |
<meta name='author' content='Anton Reznikov <anton.n.reznikov@gmail.com>'> | |
<title>JS chain</title> | |
<script type='text/javascript' src='//yastatic.net/jquery/2.1.3/jquery.min.js'></script> | |
<script type='text/javascript' src='//yastatic.net/bootstrap/3.3.1/js/bootstrap.min.js'></script> | |
<link rel='stylesheet' href='//yastatic.net/bootstrap/3.3.1/css/bootstrap.min.css'> |
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
use strict; | |
use warnings; | |
use 5.010; | |
package BasePackage; | |
my %STORAGE = (); | |
sub add { | |
my ($class, $key) = @_; | |
say "add $class <- $key"; |
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/gawk -f | |
/^[[:blank:]]*(\#.*)?$/ { | |
next; | |
} | |
{ | |
v = $1 + 0.0; | |
xs = xs + v; | |
xxs = xxs + v * v; |