This file contains hidden or 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
| [BlockSite] | |
| [My Sites] | |
| http://money.cocokulu.jp/ | |
| https://money.cocokulu.jp/ | |
| http://github.com/ | |
| https://github.com/ | |
| http://*.github.com/ | |
| https://*.github.com/ | |
| http://*.akamai.net/ | |
| https://*.akamai.net/ |
This file contains hidden or 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 Media Maker | |
| // @namespace http://gist.github.com/2156093 | |
| // @description Add item to Media Maker | |
| // @include http://*.amazon.* | |
| // ==/UserScript== | |
| // Version 20100312 | |
| var DEBUG=true; |
This file contains hidden or 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 Suginami Ward Tweaks | |
| // @namespace http://gist.github.com/2156095 | |
| // @include https://www.library.city.suginami.tokyo.jp/TOSHOW/asp/WwYoySettei.aspx* | |
| // ==/UserScript== | |
| tweaks(); | |
| function tweaks() { | |
| var comboLib = document.evaluate("//select[@id='cmbUkeKan']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
| comboLib.selectedIndex = 5; // 宮前 |
This file contains hidden or 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 Amazon Calil | |
| // @namespace http://gist.github.com/2156262 | |
| // @description Show calil page from Amazon book listing | |
| // @include http://*.amazon.* | |
| // ==/UserScript== | |
| var DEBUG=true; | |
| showCalil(); | |
| function showCalil() { |
This file contains hidden or 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
| Dir::glob("ErrorReports*/*/*.OrderEvents.txt").each do |file| | |
| puts "#{file} : #{File.stat(file).size}" | |
| File::delete(file) | |
| end | |
| Dir::glob("ErrorReports*/*1.24.*.zip").each do |file| | |
| puts "#{file} : #{File.stat(file).size}" | |
| File::delete(file) | |
| end |
This file contains hidden or 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
| require "rexml/document" | |
| include REXML | |
| @elem = "" | |
| def printElem(name) | |
| begin | |
| print @elem.elements[name].text + ":" | |
| rescue | |
| # Nothing to do | |
| end |
This file contains hidden or 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
| include Math | |
| Dir.glob("*/*OrderEvents.Delay.csv") do |file| | |
| i = 1 | |
| max = 0 | |
| sum = 0 | |
| File.open(file).each do |line| | |
| delay = 0 | |
| delay = line.split(",")[5].to_i unless i == 1 | |
| sum += delay |
This file contains hidden or 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
| ren = Proc.new do |tdir,ind| | |
| puts "#{ind} #{tdir}" | |
| Dir::foreach(tdir) do |ft| | |
| next if /^\.+$/ =~ ft | |
| fo = tdir + "/" + ft | |
| if FileTest.file?(fo) then | |
| next unless File.extname(fo).downcase == ".jpg" | |
| ymd = File::mtime(fo).strftime("%Y%m%d") | |
| next if File.basename(fo)[0..7] == ymd # すでに日付がついてるときは無視 | |
| fd = "#{tdir}/#{ymd}-#{ft}" |
This file contains hidden or 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
| require "zipruby" | |
| require "fileutils" | |
| def zip_rec(folder) | |
| Zip::Archive.open("#{folder}.zip", Zip::CREATE) do |arc| | |
| fd = folder | |
| arc.add_dir(fd) | |
| Dir.glob("#{fd}/**/*").each do |path| | |
| if File.directory?(path) |
This file contains hidden or 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
| require 'uconv' #ここ動かない | |
| File.open(ARGV[0]).each do |line| | |
| vals = line.gsub(/,,/,',N/A,').gsub(/,,/,',N/A,').split(',') | |
| puts Uconv.sjistou16(vals[1..-1].join("\t"))#ここも動かない | |
| end |