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 function breakSnake(id) | |
if (type(id) ~= "string") then | |
return id | |
end | |
return (id:gsub("(%w)_(%a)", function(a, b) | |
return a .. b:upper() | |
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
local pote = require("pote") | |
function love.load(args) | |
pote.mount(args) | |
print(love.filesystem.read("app/main.lua")) | |
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
function math.repent() | |
return 3 | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
<style> | |
.container > *:first-child::before { | |
content: "X"; | |
color: black; | |
font-size: 2em; | |
} |
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
--[[ | |
Cube Timer | |
Version 3.1 | |
]] | |
local start_keys = {"lctrl", "ralt"} | |
local start_keys_down = {false, false} | |
local keys_down = false | |
local keys_down_last = false |
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
var size=3; | |
var seqlen=30; | |
var numcub=5; | |
var mult=false; | |
var cubeorient=false; | |
var colorString = "yobwrg"; //In dlburf order. May use any colours in colorList below | |
// list of available colours | |
var colorList=new Array( | |
'y', "yellow", "yellow", |
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
--Luby 1.0 | |
function construct_iterator(n) | |
local at = 0 | |
return function() | |
at = at + 1 | |
return n[at] | |
end, n | |
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
return { | |
["html"] = { | |
value_process = function(source) | |
if (type(source) == "string") then | |
return source:gsub("\n", "\n<br />") | |
else | |
return source | |
end | |
end, | |
extension = ".html", |
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
--[[ | |
Lua Minify 1.0 | |
Usage: | |
lua minify.lua comments DIRECTORY | |
strips comments from all .lua files in the directory, recursively, and puts them in DIRECTORY/minified | |
lua minify.lua minify DIRECTORY | |
strips comments and minifies code from all .lua files and places them like the prior command. | |
]] |
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 ffi = require("ffi") | |
-- Create a C struct representing the header for our packet | |
ffi.cdef([[ | |
typedef struct { | |
uint32_t uuid; // user identifier | |
uint32_t size; // in bytes | |
uint32_t bitrate; // in Hz | |
uint16_t bitdepth; // bits per sample | |
uint16_t channels; // probably 1 or 2 |