Skip to content

Instantly share code, notes, and snippets.

# Sony Computer Entertainment CECH-ZKB1
virtual_modifiers:
- fn
modmap:
- remap:
btn_right:
held: fn
alone: btn_right
device_name = "ELECOM ELECOM UltimateLaser Mouse"
[[dual_role]]
input = "BTN_SIDE"
hold = ["KEY_LEFTSHIFT"]
tap = ["BTN_SIDE"]
[[dual_role]]
input = "BTN_EXTRA"
hold = ["KEY_LEFTCTRL"]
// ==UserScript==
// @name Presto Gestures
// @namespace https://x.com/cxx
// @version 0.1.2
// @description Opera-like mouse gestures with middle mouse button instead of right
// @match *://*/*
// @grant GM_openInTab
// @grant window.close
// ==/UserScript==
device_name = "ELECOM ELECOM UltimateLaser Mouse"
[[dual_role]]
input = "BTN_SIDE"
hold = ["KEY_LEFTCTRL"]
tap = ["BTN_SIDE"]
[[dual_role]]
input = "BTN_EXTRA"
hold = ["KEY_LEFTSHIFT"]
# 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
// 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
//
// 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
@cxx
cxx / ii.user.js
Created July 3, 2011 05:56
いい…
// ==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);
@cxx
cxx / tv.rb
Created September 22, 2012 06:37
EasyCAP
#!/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
@cxx
cxx / .xsession-errors
Created April 27, 2012 11:04
Unable to install GNOME extensions from extensions.gnome.org
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"'