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
tell application "iTunes" | |
play | |
repeat while (true) | |
delay 1 | |
next track | |
end repeat | |
end tell |
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 warnings; | |
sub bucket_sort { | |
my ($array, $range) = @_; | |
my @bucket; | |
push @{ $bucket[$_] ||= [] }, $_ for @$array; | |
return [ map {@{$bucket[$_]}} grep {$bucket[$_]} (0..$range) ]; | |
} |
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
sub bubble_sort { | |
my ($array) = @_; | |
for my $i (0..$#$array) { | |
for my $j (0..($#$array-$i-1)) { | |
if ($array->[$j] > $array->[$j+1]) { | |
($array->[$j], $array->[$j+1]) = ($array->[$j+1], $array->[$j]); | |
} | |
} | |
} | |
return $array; |
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 warnings; | |
use Perl6::Say; | |
use Data::Dumper; | |
use Test::More qw(no_plan); | |
sub p ($) { | |
say Dumper @_; | |
} |
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 warnings; | |
use Perl6::Say; | |
use Data::Dumper; | |
#use Test::More qw(no_plan); | |
sub p ($) { | |
say Dumper @_; | |
} |
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
// 1回生向け課題のめも | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <errno.h> | |
const int DEFAULT_RECORDS_LIST_SIZE = 16; |
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
// ==UserScript== | |
// @name imouto_kabu | |
// @namespace jp.hakobe.gm | |
// @include * | |
// ==/UserScript== | |
document.body.innerHTML = document.body.innerHTML.replace(/株/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
/* | |
* Tree Style Tab with Fx3 new theme for a right-side tab bar | |
* | |
* Tree Style Tab with Fx3 new theme | |
* http://userstyles.org/styles/4677 | |
* | |
* Apply Mac OS style to Tree Style Tab | |
* https://addons.mozilla.org/firefox/addon/5890 | |
*/ | |
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
my ($address) = Email::Address->parse(q!"DMNG" <dummy@mac.com>!); | |
p $address->user; # dummy | |
p $address->host; # host |
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
require 'test/unit' | |
module Test::Unit::Assertions | |
def assert_or(*asserts) | |
asserts.each do |a| | |
a[] rescue next | |
return | |
end | |
raise Test::Unit::AssertionFailedError |