- GitHub Staff
- https://bento.me/kyanny
- @kyanny
- in/kyanny
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
describe "App.request", -> | |
deferred = null | |
beforeEach -> | |
sinon.stub(App, "request").yieldsTo('done', {res: "ok"}) | |
afterEach -> | |
App.request.restore() |
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
class Object | |
def pipe | |
yield self | |
end | |
end | |
# From https://github.com/rspec/rspec-rails/pull/766/files | |
# Without Object#pipe | |
types = begin |
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
import java.util.ArrayList; | |
import java.util.Collections; | |
public class Sekigae{ | |
public static void main(String[] args){ | |
ArrayList<String> list = new ArrayList<String>(); | |
list.add("okkun"); | |
list.add("kitak"); |
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
module Foo | |
module_eval do | |
host_name = `hostname`.chomp | |
host_name_short = `hostname -s`.chomp | |
queue_name = "#{host_name}" | |
# mod = Module.new | |
# mod.module_eval %Q{ | |
# @queue = :abc #host_name | |
# def self.perform |
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
#!perl | |
# perl jquery_patch.pl jquery-n.nn.min.js > jquery-n.nn.min.patched.js | |
$old = join "|", map quotemeta, ( | |
q{/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/}, | |
q{/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/}, | |
q{/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/} | |
); | |
$new = q{/^(?:\s*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/}; |
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
#!/home/kyanny/perl5/perlbrew/perls/perl-5.12.2/bin/perl | |
use strict; | |
use Web::Scraper; | |
use URI; | |
use YAML; | |
my $uri = URI->new("http://chat.studio.cx/o-cha/jsp/superbeginner/enter.php"); | |
my $scraper = scraper { | |
process 'form input', 'list[]' => '@name'; | |
}; |
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
javascript:(function(){var d=new Date(); alert("%E3%80%90" + [d.getYear()+1900,d.getMonth()+1,d.getDate()].join('/') + '%E3%80%91' + '<a href="' + location + '">' + document.title + '</a>')})(); |
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
use strict; | |
use warnings; | |
my $API_USERNAME = $ENV{DAYS_USERNAME}; | |
my $API_PASSWORD = $ENV{DAYS_EYEFI_PASSWORD}; | |
my $API_ENDPOINT = 'http://30d.jp/manage/library/main.php'; | |
my $filepath = $ARGV[0]; | |
unless ($API_PASSWORD && $filepath) { |