Skip to content

Instantly share code, notes, and snippets.

View prust's full-sized avatar

Peter Rust prust

View GitHub Profile
@prust
prust / main.lua
Created April 15, 2017 05:24 — forked from a327ex/main.lua
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)
@prust
prust / inherits.js
Last active December 19, 2015 09:49 — forked from kof/inherits.js
Updated to match the latest version in node (added writeable: true, configurable: true, which have been in node since 0.4.9 https://github.com/joyent/node/commit/1ba2c321, also added `super_` which has been in node since the beginning, apparently)
/**
* Inherit prototype properties
* @param {Function} ctor
* @param {Function} superCtor
*/
_.mixin({
inherits: (function(){
function noop(){}
function ecma3(ctor, superCtor) {