$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices server.c -o server
$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices client.c -o client
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
<html> | |
<body onload="onload()"> | |
<img src="http://please-sleep.cou929.nu/images/twitter-48.png?normal"/> | |
<iframe src="./test.html?noraml"></iframe> | |
<script src="./test.js?noraml"></script> | |
<script> | |
// img | |
(new Image()).src = 'http://please-sleep.cou929.nu/images/twitter-48.png?dynamic'; |
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
<html> | |
<body> | |
<script> | |
var iframe = document.createElement('iframe'); | |
document.body.appendChild(iframe); | |
var iframe_doc = iframe.contentWindow.document; | |
iframe_doc.write('<html><body><sc' + 'ript>alert(window.location.hash)</sc' + 'ript></body></html>'); | |
</script> | |
</body> | |
</html> |
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; | |
my @lines = <>; | |
print convert( join '', @lines ); | |
sub convert { | |
my $text = shift; | |
$text =~ s/\r//g; |
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
<html> | |
<body> | |
<script type="text/javascript"> | |
var blackhole_image_url = 'http://blackhole.webpagetest.org/', | |
wait_interval = 3000; | |
// 3秒じゃタイムアウトされない | |
loadWithImageElement(blackhole_image_url + 'element.png'); | |
// 3秒じゃタイムアウトされない |
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(define) { | |
define([], function() { | |
'use strict'; | |
var ColorSpace = function() {}; | |
ColorSpace.prototype.HSVtoRGB = function(h, s, v) { | |
var r, g, b; | |
while (h < 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use File::Find::Rule; | |
use File::Basename; | |
my $STATE_OK = 0; | |
my $STATE_WARNING = 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
$ perl -MNetAddr::IP -le "print NetAddr::IP->new('192.168.1.0/24')->range" | |
192.168.1.0 - 192.168.1.255 |
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 | |
package TestPack; | |
use strict; | |
use warnings; | |
sub new { | |
my ($class) = @_; | |
return bless {}, $class; | |
} |
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
$ perl -MTime::Piece -le '$t = Time::Piece->strptime("2012-12-10", "%Y-%m-%d"); print $t->strftime("%Y/%m/%d %H:%M:%S")' | |
2012/12/10 00:00:00 |