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
#! /home/stuserbot/bin/lua | |
local rt = {} | |
local getenv = os.getenv | |
local strupper = string.upper | |
local strlower = string.lower | |
local format = string.format | |
local gsub = string.gsub | |
local setmetatable = setmetatable | |
local write = io.write |
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
# the full list is at http://www.scintilla.org/SciTEDoc.html # | |
#settings provided in Lua for Windows' SciTEGlobal.properties | |
import minilfw | |
#font change | |
font.base=font:Consolas,size:8 | |
font.small=$(font.base) | |
font.comment=$(font.base) | |
font.code.comment.box=$(font.comment) |
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 iup = require "iuplua" | |
local cairo = require "lcairo" | |
local drawf, errmsg | |
local function showerr(hdc, err) | |
uhoh = cairo.CreateContext(hdc) | |
cairo.set_source_rgb(uhoh,1,0,0) | |
cairo.select_font_face (uhoh,"Consolas", | |
cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD) |
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
--takes the environment to encapsulate | |
local function modme(encenv) | |
local retmod = {} | |
local envmt = {} | |
function envmt.__index(t, k) | |
return retmod[k] or encenv[k] | |
end | |
function envmt.__newindex(t, k, v) | |
retmod[k] = v | |
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
--has the same signature as classic module (almost) | |
local function module(name, encenv) | |
local mod_t = {} | |
local envmt = {} | |
function envmt.__index(t, k) | |
return mod_t[k] or encenv[k] | |
end | |
function envmt.__newindex(t, k, v) | |
mod_t[k] = v |
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
do | |
local dox, doy | |
local function drag(x, y) | |
end | |
local function grab(x, y) | |
dox, doy = x, y | |
drag(x, y) | |
end | |
local function release(x, y) | |
dox, doy = nil, nil |
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
for _,s in ipairs{"AZ","09","!!","??","::","..","--"} do | |
local b1=string.byte(s:sub(1,1)) | |
local b2=string.byte(s:sub(2,2)) | |
for i=b1, b2 do | |
print(string.format([[ | |
[%q]={ | |
{}, | |
},]],string.char(i))) | |
end | |
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
hostname | |
uname -sr | |
date | |
uptime |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Stuart P. Bentley</title> | |
<link rel="shortcut icon" href="stuhat.svg"> | |
<style> | |
h1, h2, h3, h4, h5, h6, header, address { | |
margin: 0; | |
padding: 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
/* | |
* Copyright 2010 Barricane Technology Ltd., All rights reserved. | |
* | |
* Released under the MIT licence. | |
*/ | |
/** | |
* Battenburg is simply a 2x2 matrix with non-mutating | |
* methods. | |
* |