This file is to be used with the example.lua
file.
Here, we use Markdown's ability to use shortlink images:
Testing results: ![shield_build] ![shield_tests]
Version information:
local glfw = require("glfw3") --Let's say we have a magic GLFW3 binding there! | |
local openGL = require("opengl") | |
openGL.loader = glfw.GetProcAddress | |
openGL:import() | |
--and somewhere else | |
local vbo = ffi.new("GLuint[1]") | |
gl.GenBuffers(1, vbo) | |
gl.BindBuffer(GL.ARRAY_BUFFER, vbo[0]) | |
gl.BufferData(GL.ARRAY_BUFFER, ffi.sizeof(vertices), vertices, GL.STATIC_DRAW) |
--[[ | |
]] | |
local lfs = require("lfs") | |
local CWD = "./" | |
function readfile(path) | |
local handle = io.open(path, "r") | |
if (handle) then | |
local data = handle:read("*a") | |
handle:close() |
var http = require("http"); | |
var https = require("https"); | |
var crypto = require('crypto'); | |
function HTTPDigest(username, password, use_https) { | |
this.username = username; | |
this.password = password; | |
this.use_https = use_https; | |
} |
local function table_copy(source, target) | |
target = target or {} | |
for key, value in pairs(source) do | |
target[key] = value | |
end | |
return target | |
end |
--[[ | |
LuaJIT-cURL | |
Lucien Greathouse | |
LuaJIT FFI cURL binding aimed at cURL version 7.38.0. | |
Copyright (c) 2014 lucien Greathouse | |
This software is provided 'as-is', without any express | |
or implied warranty. In no event will the authors be held | |
liable for any damages arising from the use of this software. |
debug.setmetatable(function() end, { | |
__concat = function(self, with) | |
return function(...) | |
return self(with(...)) | |
end | |
end | |
}) | |
local sin = math.sin | |
print((sin .. sin)(5)) --sin(sin(5)) |
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 |
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 |
local pote = require("pote") | |
function love.load(args) | |
pote.mount(args) | |
print(love.filesystem.read("app/main.lua")) | |
end |