Skip to content

Instantly share code, notes, and snippets.

tell application "iTunes"
play
repeat while (true)
delay 1
next track
end repeat
end tell
#!/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) ];
}
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;
#!/usr/bin/env perl
use strict;
use warnings;
use Perl6::Say;
use Data::Dumper;
use Test::More qw(no_plan);
sub p ($) {
say Dumper @_;
}
#!/usr/bin/env perl
use strict;
use warnings;
use Perl6::Say;
use Data::Dumper;
#use Test::More qw(no_plan);
sub p ($) {
say Dumper @_;
}
// 1回生向け課題のめも
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
const int DEFAULT_RECORDS_LIST_SIZE = 16;
// ==UserScript==
// @name imouto_kabu
// @namespace jp.hakobe.gm
// @include *
// ==/UserScript==
document.body.innerHTML = document.body.innerHTML.replace(/株/g, '妹'); // 無茶しすぎ
/*
* 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
*/
my ($address) = Email::Address->parse(q!"DMNG" <dummy@mac.com>!);
p $address->user; # dummy
p $address->host; # host
require 'test/unit'
module Test::Unit::Assertions
def assert_or(*asserts)
asserts.each do |a|
a[] rescue next
return
end
raise Test::Unit::AssertionFailedError