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/ruby | |
# -*- coding: utf-8 -*- | |
# マルコフ連鎖をしてみるやつ | |
$KCODE = 'UTF8' | |
# Array::choiseを追加 | |
class Array | |
def choise | |
self[rand(self.size)] |
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
sub capture_thumbnails { | |
my %opt = @_; | |
my $file = $opt{file} or die; | |
my $offset = $opt{offset} || 0; | |
my @stats = stat($file); | |
my $deflength = 60 * ($stats[7]/120000000); | |
my $un_reset = $opt{un_reset}; |
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 Deny Rakuten News | |
// @namespace http://espion.just-size.jp/archives/05/136155838.html | |
// @description Deny Rakuten News | |
// @include https://*.step.rakuten.co.jp/* | |
// @include https://*.travel.rakuten.co.jp/rsv/RsvInput.do* | |
// @include https://my.rental.rakuten.co.jp/action/my/* | |
// @include https://delivery.rakuten.co.jp/*?module=Default&action=OrderStep* | |
// @include https://auction.item.rms.rakuten.co.jp/* | |
// @include https://my.checkout.rakuten.co.jp/myc/purchase/Confirm |
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 ruby | |
`ps | grep /spork$ | grep -v grep` | |
if $?.success? | |
exec('autospec') | |
else | |
IO.popen('(spork&) 2>&1') do |messages| | |
puts(message = messages.gets) until message =~ /ready/ | |
exec('autospec') |
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
--- eval.c.orig 2009-12-21 17:11:42.000000000 +0900 | |
+++ eval.c 2009-12-24 19:18:21.671875000 +0900 | |
@@ -210,3 +210,3 @@ | |
# ifdef __CYGWIN__ | |
-int _setjmp(), _longjmp(); | |
+int _setjmp(); void _longjmp(); | |
# endif | |
--- gc.c.orig 2009-12-24 17:28:08.000000000 +0900 | |
+++ gc.c 2009-12-24 19:18:17.875000000 +0900 | |
@@ -42,3 +42,3 @@ |
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
文字を読みながら、そこに表現されてある音響が、いつまでも耳にこびりついて、離れないことがあるだらう。オセロオであつたか、ほかの芝居であつたか、しらべてみれば、すぐ判るが、いまは、もの憂く、とにかくシエクスピア劇のひとつであることは間違ひない、とだけ言つて置いて、その芝居の人殺しのシイン、寝室でひそかに女をしめ殺して、ヒロオも、われも、瞬時、ほつと重くるしい溜息。額の油汗拭はむと、ぴくとわが硬直の指うごかした折、とん、とん、部屋の外から誰やら、ドアをノツクする。ヒロオは、恐怖のあまり飛びあがつた。ノツクは、無心に、つづけられる。とん、とん、とん、とん、ヒロオは、その場で気が狂つたか、どうか、私はその後の筋書を忘れてしまつた。 |
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
#ponyを使ってgmail経由でメールを送信 | |
#pony : http://github.com/benprew/pony | |
#メールクライアントの設定-GMailヘルプ : http://mail.google.com/support/bin/answer.py?hl=jp&answer=13287 | |
require 'rubygems' | |
require 'pony' | |
Pony.mail(:to => '[email protected]', | |
:body => "あああああああああああ", #bodyもsubjectも日本語OK(windows/cygwin) | |
:subject => "テストとととととt", | |
:charset => "utf8", #つけないと警告が出る |
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
マイクロソフト | |
COFFEE「舞黒想風人」 | |
インターネット | |
歌声喫茶「伊多音都」 | |
さむい | |
談話室「再夢伊」 | |
はらへった |
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
#Deploy and rollback on Heroku in staging and production | |
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
namespace :deploy do | |
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |
OlderNewer