Skip to content

Instantly share code, notes, and snippets.

PS C:\Users\Hideki> curl.exe -iI https://hidekiy.github.io/file2.txt
HTTP/1.1 404 Not Found
Server: GitHub.com
Content-Type: text/html; charset=utf-8
ETag: "5952c2db-247c"
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'
X-GitHub-Request-Id: D7EA:9677:10A594B:121E845:5B02A71C
Content-Length: 9340
Accept-Ranges: bytes
'use strict';
var Benchmark = require('benchmark');
var _ = require('lodash');
var suite = new Benchmark.Suite;
var a = [1, 2, 3];
var stopIteration = new Error('stop iteration');
// add tests
suite
.add('native-for-break', function() {
diff --git a/bin/compile b/bin/compile
index cf53bf4..e6e9002 100755
--- a/bin/compile
+++ b/bin/compile
@@ -29,6 +29,9 @@ if [ -f $BUILD_DIR/Makefile.PL ]; then
CPANM="perl -S $(which cpanm) -l $CACHE_DEPS"
mkdir -p "$CACHE_DIR"
+ echo "CPANM: $CPANM" | indent
+ perl $(which cpanm) --self-upgrade 2>&1 | indent
@hidekiy
hidekiy / gist:8019348
Created December 18, 2013 08:59
jQuery.data
> $('#colorbox').data('hoge', 123)
...
> $('#colorbox').data('hoge')
123
> jQuery.expando
"jQuery19107670532537158579"
> $('#colorbox').prop(jQuery.expando)
$master = Get-ItemProperty -path Registry::\HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings
Get-ChildItem Registry::\HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions | ForEach-Object {
for ($i = 0; $i -lt 22; $i++) {
Write-Host "Registry::$_"
Set-ItemProperty -Path "Registry::$_" -Name "Colour$i" -Value $master."Colour$i"
}
}
[supervisord]
logfile = /var/log/supervisor/supervisord.log
pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
[unix_http_server]
file = /tmp/supervisor.sock
chmod = 0700
[rpcinterface:supervisor]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jquery-elementize</title>
<style>
</style>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.js"></script>
use strict;
use warnings;
use Imager;
use Imager::Fill;
use LWP::Simple;
my ($xsize, $ysize) = (60, 60);
my ($xnum, $ynum) = (5, 5);
use strict;
use warnings;
use AnyEvent::Handle;
use Plack::Handler::Twiggy;
use Test::TCP;
test_tcp(
client => sub {
my $port = shift;
use strict;
use Benchmark qw/cmpthese/;
cmpthese( -1, {
'core1' => \&core_reverse1,
'core2' => \&core_reverse2,
'push_pop' => \&push_pop_style,
'pre_reverse' => \&pre_reverse,
});