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
# Credit: https://github.com/mooz/xkeysnail/blob/bf3c93b4fe6efd42893db4e6588e5ef1c4909cfb/example/config.py#L62-L125 | |
shared: | |
terminals: &terminals | |
- gnome-terminal-server | |
- qterminal | |
- Com.github.amezin.ddterm | |
- emacs | |
virtual_modifiers: | |
- CapsLock |
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
// dotemu2mame.js - convert data of games ported by DotEmu to MAME ROM sets | |
// | |
// Usage: | |
// node dotemu2mame.js [ROM directory] | |
// | |
// Requirements: | |
// - Node.js v6 or later | |
// - [Microsoft Windows] .NET Framework 4.5 or later (included in Windows 8/10) | |
// - [Linux] /usr/bin/zip | |
// |
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
// avault2mame.js - convert arcade game data in Atari Vault to older MAME ROM sets | |
// | |
// Usage: | |
// node avault2mame.js [ROM directory] | |
// (ex. on Linux) node avault2mame.js ~/.steam/steam/steamapps/common/Atari\ Vault/AtariVault_Data/StreamingAssets/FOCAL_Emulator | |
// | |
// Requirements: | |
// - Node.js v6 or later | |
// - [Microsoft Windows] .NET Framework 4.5 or later (included in Windows 8/10) | |
// - [Linux] /usr/bin/zip |
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 いい… | |
// @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 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 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 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 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 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 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 'net/http' | |
require 'securerandom' | |
require 'tempfile' | |
require 'RMagick' | |
def bin(str) | |
str.dup.force_encoding("ASCII-8BIT") | |
end |
NewerOlder