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
unpack = table.unpack or unpack | |
fifo_path = "/tmp/mpd.fifo" | |
keys = keyleds.groups[keyleds.config.group] or keyleds.db | |
width = tonumber(keyleds.config.width) or 13 | |
height = tonumber(keyleds.config.height) or 5 | |
colors = keyleds.config.colors | |
buffer = RenderTarget:new() |
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
local unpack = table.unpack or unpack | |
graph = { | |
["ESC"] = {"F1", "GRAVE", "1"}, | |
["F1"] = {"ESC", "F2", "1", "2", "3"}, | |
["F2"] = {"F1", "F3", "2", "3"}, | |
["F3"] = {"F2", "F4", "3", "4", "5"}, | |
["F4"] = {"F3", "F5", "4", "5", "6"}, | |
["F5"] = {"F4", "5", "6", "7", "F6"}, | |
["F6"] = {"F5", "F7", "6", "7", "8"}, |
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
keys = keyleds.db | |
colorCapsLock = tocolor(keyleds.config.colorCapsLock) | |
colorScrollLock = tocolor(keyleds.config.colorScrollLock) | |
if type(keys) ~= "table" then | |
local tempKeys = {} | |
for i = 1, #keys do | |
table.insert(tempKeys, keys[i]) | |
end |
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
local unpack = table.unpack or unpack | |
keys = keyleds.groups[keyleds.config.group] or keyleds.db | |
width = tonumber(keyleds.config.width) or 13 | |
height = tonumber(keyleds.config.height) or 5 | |
pixelColor = tocolor(keyleds.config.pixelColor) or tocolor('red') | |
delay = tonumber(keyleds.config.delay) or 100 | |
transparent = tocolor(0, 0, 0, 0) |
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
unpack = table.unpack or unpack | |
keys = keyleds.db | |
transparent = tocolor(0, 0, 0, 0) | |
currentPoint = nil | |
previousPoint = nil | |
startColor = tocolor(keyleds.config.startColor) or tocolor(1, 0, 0) | |
endColor = tocolor(keyleds.config.endColor) or tocolor(0, 1, 1) | |
fadeTime = keyleds.config.fadeTime or 3 | |
graph = { | |
["ESC"] = {"F1", "GRAVE", "1"}, |
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
keys = keyleds.db | |
colorCapsLock = tocolor(keyleds.config.colorCapsLock) | |
colorScrollLock = tocolor(keyleds.config.colorScrollLock) | |
if type(keys) ~= "table" then | |
local tempKeys = {} | |
for i = 1, #keys do | |
table.insert(tempKeys, keys[i]) | |
end |
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
-- lightning.lua | |
graph = { | |
["ESC"] = {"F1", "GRAVE", "1"}, | |
["F1"] = {"ESC", "F2", "1", "2", "3"}, | |
["F2"] = {"F1", "F3", "2", "3"}, | |
["F3"] = {"F2", "F4", "3", "4", "5"}, | |
["F4"] = {"F3", "F5", "4", "5", "6"}, | |
["F5"] = {"F4", "5", "6", "7", "F6"}, | |
["F6"] = {"F5", "F7", "6", "7", "8"}, | |
["F7"] = {"F6", "F8", "7", "8", "9"}, |
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
local unpack = table.unpack or unpack | |
keys = keyleds.groups[keyleds.config.group] or keyleds.db | |
width = tonumber(keyleds.config.width) or 13 | |
height = tonumber(keyleds.config.height) or 5 | |
snakeColor = tocolor(keyleds.config.snakeColor) or tocolor('green') | |
foodColor = tocolor(keyleds.config.foodColor) or tocolor('red') | |
snakeHeadColor = tocolor(keyleds.config.snakeHeadColor) or tocolor('orange') | |
snakeTailColor = tocolor(keyleds.config.snakeTailColor) or tocolor('purple') | |
delay = tonumber(keyleds.config.delay) or 100 |
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
(async () => { | |
year=2023 | |
username = 'hikaru' | |
for(var month=1; month<=12; month++) { | |
let url = `https://api.chess.com/pub/player/${username}/games/${year}/${month}/pgn` | |
response = await fetch(url) | |
const bodyText = await response.text(); | |
const blob = new Blob([bodyText], { type: 'text/plain' }); | |
const a = document.createElement('a'); | |
a.style.display = 'none'; |
NewerOlder