Skip to content

Instantly share code, notes, and snippets.

View usualoma's full-sized avatar
🏠
Working from home

Taku Amano usualoma

🏠
Working from home
View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use File::Temp qw/ tempfile /;
use PHP::Var;
use PHP::Session::Serializer::PHP;
my $serializer = PHP::Session::Serializer::PHP->new;
Rate pnp_session php_var_enclose php_var_purity php_var
pnp_session 33.4/s -- -28% -29% -30%
php_var_enclose 46.7/s 40% -- -0% -2%
php_var_purity 46.9/s 40% 0% -- -1%
php_var 47.6/s 42% 2% 1% --
Rate unserialize code
unserialize 4.63/s -- -86%
code 32.6/s 603% --
wh208% ls -l `/bin/which ssh-keygen` [~]
-rwxr-xr-x 1 root root 131204 2009-10-05 21:48 /usr/bin/ssh-keygen
#!/usr/bin/perl
use strict;
use warnings;
my $maze = &load_maze;
&analyze_maze($maze);
&print_maze($maze);
sub analyze_maze {
for (var i = 10; i > 0; i--) {
alert(i);
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
</head>
<body>
contents.
<script type="text/javascript" src="http://gist.github.com/raw/305325/9cff222bc96dbc3eb9d88e66f729cfb2fd6b1158/gistfile1.js"></script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<script type="text/javascript" src="http://gist.github.com/raw/305325/9cff222bc96dbc3eb9d88e66f729cfb2fd6b1158/gistfile1.js"></script>
</head>
<body>
contents.
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(function($) {
alert('jQuery.ready()');
});
</script>
</head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function() {
alert('onload');
};
</script>
</head>
if [1, 2, 3].include?(1)
puts('hoge')
end