This file contains hidden or 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 listTable(tbl, prefix) | |
local prefix = prefix or "" | |
for i,t in pairs(tbl) do | |
if type(t) == "table" then listTable(t, prefix.."."..i) | |
elseif type(t) == "function" then print(prefix.."."..i) end | |
end | |
end | |
function love.load() | |
listTable(love, "love") |
This file contains hidden or 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
love=${HOME}/.bin/love # location of love binary | |
zip=/usr/bin/zip # location of zip | |
luac=/usr/bin/luac # location of luac | |
# name of the .love | |
game= | |
# source files. if you have subdirectories, add */*.lua | |
sources=*.lua | |
# resource files like images, fonts and sounds. | |
res= |
This file contains hidden or 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
// ==UserScript== | |
// @include *love2d.org/forums/viewtopic.php* | |
// ==/UserScript== | |
(function(){ | |
function getElementsByTagAndClass(tag, cls) { | |
var tags = document.getElementsByTagName(tag); | |
var ret = []; | |
for (var i = 0; i < tags.length; ++i) { | |
if (tags[i].className.indexOf(cls) > -1) | |
ret.push(tags[i]); |
This file contains hidden or 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
// ==UserScript== | |
// @include *love2d.org/forums/viewtopic.php* | |
// ==/UserScript== | |
(function() { | |
var users = []; // the users to hide automatically | |
function getElementsByTagAndClass(tag, cls) { | |
var tags = document.getElementsByTagName(tag); | |
var ret = []; |
This file contains hidden or 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 chrome = require "chrome" | |
local capi = { luakit = luakit } | |
local page = "chrome://favs/" | |
local pattern = page.."?" | |
local cutycapt_bin = "/home/matthias/.bin/CutyCapt" | |
local html_template = [====[ | |
<html> |
This file contains hidden or 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
#include <lua_proxy.hpp> | |
#include <opencv.hpp> | |
// Exposing cv::Mat to Lua | |
template<> struct LuaXTraits<cv::Mat> | |
{ | |
constexpr static const char *name() | |
{ | |
return "Type.cv::Mat"; |
This file contains hidden or 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
int l_imwrite(lua_State *L) | |
{ | |
// see https://gist.github.com/4154182 | |
cv::Mat *img = LuaProxy<cv::Mat>::get(L, 1); | |
const char *path = luaL_checkstring(L, 2); | |
if (cv::imwrite(path, *img)) | |
{ | |
lua_pushboolean(L, true); | |
return 1; |
This file contains hidden or 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 lhc = require 'lhc' | |
local SAMPLERATE = 44100 | |
local generator = { | |
sine = function(x) return math.sin(x * 2 * math.pi) end, | |
tri = function(x) x = (x-.5)%1 return math.min(2*x-1, 1-2*x) end, | |
saw = function(x) return (2*x-1)%2 - 1 end, | |
rect = function(x) return 2 * math.floor((2*x)%2) -1 end, | |
wn = function(x) return math.random() end, |
This file contains hidden or 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
love=$(/usr/bin/env love) | |
zip=$(/usr/bin/env zip) | |
luac=$(/usr/bin/env luac) | |
# path to win and osx distributions | |
windir=~/Stuff/love-win-x86 | |
osxapp=~/Stuff/love.0.8.app | |
game=TITLE-OF-THE-GAME.love |
This file contains hidden or 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
#!/usr/bin/python | |
class AnsiColor: | |
default = '\033[00;30m' | |
bold = '\033[01;30m' | |
green = '\033[00;32m' | |
boldgreen = '\033[01;32m' | |
boldred = '\033[01;31m' | |
pass |
OlderNewer