Skip to content

Instantly share code, notes, and snippets.

@Plaque-fcc
Plaque-fcc / gist:3777735
Created September 24, 2012 19:13
Let Luakit.Introspector load arbitrary binding configs.
@@ -330,19 +330,19 @@ local function bind_tostring(b)
end
end
local source_lines = {}
local function function_source_range(func, info)
- local lines = source_lines[info.short_src]
+ local lines = source_lines[info.source]
if not lines then
@Plaque-fcc
Plaque-fcc / bookmarks_migrate.lua
Created September 2, 2012 12:31
Bookmarks.db migration SQLite3->SQLite3 (luakit develop).
local usage = [[Usage: luakit -c bookmark_migrate.lua [old bookmark db path] [new bookmark db path]
Imports bookmarks from old database schema:
CREATE TABLE IF NOT EXISTS bookmarks (
id INTEGER PRIMARY KEY,
uri TEXT NOT NULL,
title TEXT,
desc TEXT,
created INTEGER,
@Plaque-fcc
Plaque-fcc / history_chrome.lua
Created July 29, 2012 18:35
history_chrome.lua invert selection feature.
-- Grab what we need from the Lua environment
local table = table
local string = string
local io = io
local print = print
local pairs = pairs
local ipairs = ipairs
local math = math
local assert = assert
local setmetatable = setmetatable
@Plaque-fcc
Plaque-fcc / gmicesheet
Created July 17, 2012 04:06
Some data on smart gmice.
HID_EE_Write16 0000 276F //Checksum
HID_EE_Write16 0001 FFFF //Unused
HID_EE_Write16 0002 FFFF //Reserve for LaserPower
HID_EE_Write16 0003 A4A4 //VerifyCode ReportRate[7:0](ms)
HID_EE_Write16 0004 0000 //DPI_Index(zero base)
HID_EE_Write16 0005 0000
HID_EE_Write16 0006 0004
HID_EE_Write16 0007 0008 //ReportRate(ms)
HID_EE_Write16 0008 0017 //Button Style Addr
HID_EE_Write16 0009 0021 //Wheel Style Addr