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 pixiv Big Image | |
// @namespace http://twitter.com/cxx | |
// @include http://www.pixiv.net/member_illust.php?mode=medium&illust_id=* | |
// @version 1.0.0 | |
// ==/UserScript== | |
var img = document.querySelector('.works_display > a[href*="big"] > img'); | |
if (img) | |
img.src = img.src.replace('_m.', '.'); |
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 いい… | |
// @namespace http://twitter.com/cxx | |
// @include http://www.facebook.com/plugins/like.php?* | |
// @version 1.2.1 | |
// ==/UserScript== | |
var texts = document.evaluate('.//text()', document.body, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0, len = texts.snapshotLength; i < len; i++) { | |
var t = texts.snapshotItem(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
require 'RMagick' | |
include Magick | |
depth = 16 | |
range = (1 << depth) - 1 | |
orig_size = 48 | |
if ARGV.length > 0 | |
orig_img = Image.read(ARGV[0]).first |
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 'RMagick' | |
module DietGIF | |
MAX_BYTESIZE = 1024 * 1024 | |
MAX_SIZE = [500, 700] | |
MID_SIZE = [400, 600] | |
MIN_SIZE = [250, 400] | |
MIN_COLORS = 32 |
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
JS ERROR: !!! Exception was: TypeError: info is null | |
JS ERROR: !!! lineNumber = '83' | |
JS ERROR: !!! fileName = '"/usr/share/gnome-shell/js/ui/extensionSystem.js"' | |
JS ERROR: !!! stack = '"([object _private_Soup_SessionAsync],[object _private_Soup_Message])@/usr/share/gnome-shell/js/ui/extensionSystem.js:83 | |
"' | |
JS ERROR: !!! message = '"info is null"' |
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 | |
Dir.chdir("#{ENV['HOME']}/Pictures") | |
rest = 5 | |
device = loop do | |
dev = Dir["/dev/video*"].first | |
rest -= 1 | |
break dev if dev || rest == 0 | |
sleep(5) | |
end | |
exit(false) unless device |
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 | |
fail unless ARGV.length == 2 | |
file = ARGV[0] | |
weight = ARGV[1].to_i | |
open(file, "r+b:ASCII-8BIT") do |io| | |
ver, ntables, srange, eselector, rshift = io.read(12).unpack("Nn*") | |
fail unless Math.log2(ntables).floor == eselector and | |
(2**eselector)*16 == srange and |
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 | |
require 'open-uri' | |
require 'RMagick' | |
include Magick | |
palette = Hash[ *( | |
[ ["000000", "\u{2660}" ], ["157569", "\u{1f5fd}"], ["226699", "\u{1f17f}"], | |
["231f20", "\u{2b1b}" ], ["292f33", "\u{1f3b1}"], ["3b88c3", "\u{2139}" ], | |
["4288c1", "\u{1f53d}"], ["553986", "\u{1f47e}"], ["55acee", "\u{1f6b9}"], | |
["58595b", "\u{1f3a5}"], ["5c913b", "\u{264a}" ], ["5dadec", "\u{1f499}"], |
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 | |
require 'optparse' | |
fg = "\u{2b1c}" | |
bg = "\u{2139}" | |
opt = OptionParser.new | |
opt.on("-f CHAR") {|v| fg = v[0] } | |
opt.on("-b CHAR") {|v| bg = v[0] } | |
opt.parse!(ARGV) |
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 サムネイルから本棚に登録 | |
// @namespace http://twitter.com/cxx | |
// @include http://www.mangaz.com/* | |
// @include http://r18.mangaz.com/* | |
// @version 0.1.0 | |
// ==/UserScript== | |
"use strict"; |