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; |
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
// ==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
@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
Starman: | |
- Preforking standalone HTTP server | |
- Based on Catalyst::Engine::HTTP::Prefork by Andy Grundma | |
- Ported to Plack by Tatsuhiko Miyagawa | |
- Uses Net::Server::PreFork | |
- Supports HTTP/1.1 | |
- Pipelined requests | |
- Chunked request/response | |
- Keep-Alives | |
- Graceful restart with HUP (No shutdown with QUIT yet) |
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
# 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
=pod | |
Nyan Cat TAP Formatter | |
1. Save this file into your PERL5LIB | |
2. Run prove with option like following: | |
$ prove --formatter NyanCat | |
http://www.mattsears.com/articles/2011/11/16/nyan-cat-rspec-formatter |
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
package DBIx::Connector::TxnGuard; | |
use strict; | |
use warnings; | |
use Carp; | |
sub new { | |
my ($class, $dbh) = @_; | |
$dbh->begin_work; | |
return bless { dbh => $dbh }; | |
} |
OlderNewer