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
| <html> | |
| <head></head> | |
| <script type="text/javascript"> | |
| window.addEventListener('load', init, false) | |
| function init() { | |
| var color = location.hash.toString() | |
| if (color.match(/^#[0-9a-fA-F]{6}/)) { | |
| setIcon(icon(color).toDataURL()) | |
| } | |
| } |
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
| #!/usr/bin/env ruby | |
| # http://unknownplace.org/memo/2009/01/27#e001 | |
| # http://gist.github.com/53293 | |
| require 'rubygems' | |
| require 'gisty' | |
| files = Dir.glob('*', File::FNM_DOTMATCH).reject { |i| File.directory?(i) } | |
| url = Gisty.new(Dir.pwd).create files |
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
| # -*- coding: utf-8 -*- | |
| # download images from http://www.muji.net/2009ss/women/ | |
| require 'fileutils' | |
| require 'open-uri' | |
| dir = 'muji2009ss_w' | |
| FileUtils.mkdir_p dir | |
| puts "create: #{dir}" |
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
| # -*- coding: utf-8 -*- | |
| require 'open-uri' | |
| require 'pathname' | |
| require 'erb' | |
| require 'rubygems' | |
| require 'json' | |
| require 'sinatra' | |
| include ERB::Util |
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
| @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
| #context-forward, | |
| #context-back, | |
| #context-reload, | |
| #context-bookmarkpage, | |
| #context-bookmarklink, | |
| #context-stop, | |
| #context-sendpage, | |
| #context-sendimage, |
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 LDR - githubicon | |
| // @namespace http://www.relucks.org/ | |
| // @include http://reader.livedoor.com/reader/ | |
| // ==/UserScript== | |
| var fl = function(feed) { | |
| var re = /^https?:\/\/github\.com/ | |
| if (re.test(feed.channel.link)) { | |
| for (var i = 0; i < feed.items.length; i++) { |
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
| var base_dir = '/Users/youhei/Desktop/' | |
| main() | |
| function main() { | |
| var dir = base_dir + document.getElementById('crumbAlb').textContent | |
| var list = Array.filter(document.links, function(i) { | |
| return /photo\/\d+#pictop$/.test(i.href) | |
| }) | |
| if (list.length > 1) { |
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 url2img | |
| // @namespace http://relucks.org/ | |
| // @include http* | |
| // ==/UserScript== | |
| (function() { | |
| url2img(document) | |
| document.addEventListener("DOMNodeInserted", function(e){ | |
| if (e.target.tagName) { |
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
| #!/usr/bin/env ruby | |
| # -*- encoding: utf-8 -*- | |
| require 'net/http' | |
| require 'time' | |
| require 'rubygems' | |
| require 'pit' | |
| require 'kconv' | |
| def post url, opt = {} |
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 AutoPagerizeTwitterFilter | |
| // @namespace http://relucks.org/ | |
| // @include http://twitter.com/ | |
| // ==/UserScript== | |
| (function() { | |
| var reqfl = function(opt) { | |
| opt['headers'] = opt['headers'] || {} | |
| opt['headers']['Accept'] = 'application/json, text/javascript, */*' |