iPod に入ってる音楽飽きてきた感あってネットラジオから適当に流してること多い
そろそろ音源買い漁りたい
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 foo(type) { | |
return type ? | |
function() { | |
return console.log(type); | |
} : | |
console.log(this.toString()); | |
} | |
foo('foo')(); // コールバックで使う | |
foo.call('foo'); // 単独で使う |
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
package DBIx::Connector::TxnGuard; | |
use strict; | |
use warnings; | |
use Carp; | |
sub new { | |
my ($class, $dbh) = @_; | |
$dbh->begin_work; | |
return bless { dbh => $dbh }; | |
} |
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
<body itemscope itemtype="http://microformats.org/profile/hatom"> | |
<article itemscope itemtype="http://microformats.org/profile/hatom#hentry"> | |
<h2 itemprop="entry-title"> | |
<a rel="bookmark" | |
href="http://hail2u.net/blog/webdesign/document-structure.html" | |
itemprop="url"> | |
文書構造を見なおした(ている) | |
</a> | |
</h2> | |
<footer> |
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
# based on: http://pastie.org/293845 | |
module Capistrano | |
class Configuration | |
module Servers | |
alias_method :original_find_servers, :find_servers | |
def find_servers(options={}) | |
servers = original_find_servers options | |
stack_roles = task_call_frames.collect {|frame| frame.task.options[:roles]}.compact.flatten |
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 G+: notify update | |
// @namespace http://buycheapviagraonlinenow.com/ | |
// @include https://plus.google.com/* | |
// ==/UserScript== | |
var notifyServerUrl = 'http://localhost:5678/', // https://gist.github.com/1021283 | |
element = document.querySelector('.gbids'), | |
last; |
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
@charset "utf-8"; | |
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
menuitem#tombloo-menu-share { | |
display: none; | |
} |
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 Hatena::Diary: Fix edit-in-place toolbar tabindex | |
// @namespace http://lowreal.net/ | |
// @include http://d.hatena.ne.jp/*/ | |
// ==/UserScript== | |
location.href = "javascript:"+encodeURIComponent(uneval(function () { | |
Hatena.Diary.EditInPlace.Form.addEventListener('create', function (day) { | |
Array.forEach(day.element.querySelectorAll('.edit-in-place-toolbar a'), function (e) { | |
e.tabIndex = 9999; |
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 | |
# original: http://search.cpan.org/src/MIYAGAWA/WWW-NicoVideo-Download-0.01/eg/fetch-video.pl | |
use strict; | |
use WWW::NicoVideo::Download; | |
use Term::ProgressBar; | |
use Config::Pit; | |
use URI; | |
use HTML::TreeBuilder::XPath; | |
use Perl6::Say; |
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 Encode; | |
use Getopt::Long; | |
use URI; | |
use LWP::UserAgent; | |
use HTTP::Cookies::Guess; |