Skip to content

Instantly share code, notes, and snippets.

View prust's full-sized avatar

Peter Rust prust

View GitHub Profile
@kof
kof / inherits.js
Created March 24, 2011 13:10
nodejs like utility method for inheritance
/**
* Inherit prototype properties
* @param {Function} ctor
* @param {Function} superCtor
*/
_.mixin({
inherits: (function(){
function noop(){}
function ecma3(ctor, superCtor) {
@a327ex
a327ex / main.lua
Created August 21, 2015 20:25
Auto-updater
local async = require('async')
function love.load(args)
async.load()
async.ensure.atLeast(2)
local version = nil
local version_request = async.define("version_request", function()
local request = require('luajit-request')
local response = request.send(link to the version file)
@vurtun
vurtun / _readme_quarks.md
Last active December 9, 2023 12:03
Quarks: Graphical user interface

gui

func noop_free(data: void*, ptr: void*) {
}
struct TempAllocator {
base: Allocator;
start: void*;
next: void*;
end: void*;
}
// --- Library --------------------------------------------------------------------------
#include <string.h>
#include <assert.h>
struct ui_box {int x,y,w,h;};
typedef unsigned long long ui_id;
struct ui_node {
int parent;
int lst, end, nxt;
int siz[2];