Skip to content

Instantly share code, notes, and snippets.

Daniel Kolesa q66

Block or report user

Report or block q66

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nickcolors.lua
-- generates a string to be used as weechat.color.chat_nick_colors value
-- when using 256 color terminals; includes all hues, skips #000000 (16)
--
-- arguments: <min_saturation>:<max_saturation> <min_value>:<max_value>
-- as in HSV, the 4 values are between 0 and 1
-- enable if you want grayscale (232-255) to be included
local include_gray = false
-- base weechat nick colors (maps to 0-15)
local base_colors = "cyan,magenta,green,brown,lightblue,default,"
@q66
q66 / octa2048.lua
Last active Aug 29, 2015
Implementation of 2048 with OctaForge UI.
View octa2048.lua
local genblock = |val, color, tcolor| || gui.Color_Filler {
color = color, min_w = 0.18, min_h = 0.18,
gui.Label {
text = tostring(val), scale = 3.5, color = tcolor
}
}
local blocktypes = {
[0] = || gui.Color_Filler {
color = 0xccc0b3, min_w = 0.18, min_h = 0.18
@q66
q66 / gist:7170288
Last active Dec 26, 2015
lisp interpreter in vortex 2.0
View gist:7170288
let globs = {
["set" ] = |l, e| globs[l[1]] = l[2],
["cdr" ] = |l, e| rest(l[1]),
["car" ] = |l, e| first(l[1]),
["quote"] = |l, e| l[1],
["cond" ] = |l, e| if let el = firstcond(l[1], |el| eval(el[1], e))
then eval(el[2], e)
["+" ] = |l, e| l[1] + l[2],
["-" ] = |l, e| l[1] - l[2],
["*" ] = |l, e| l[1] * l[2],
You can’t perform that action at this time.