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
// MyShoutbox for MyBB | |
// (c) Pirata Nervo, www.consoleworld.net | |
// | |
// Based off: | |
// SpiceFuse AJAX ShoutBox for MyBB | |
// (c) Asad Niazi, www.spicefuse.com! | |
// | |
// Code is copyrighted and does not belong to public domain. | |
// Copying or reusing in different forms/softwares isn't allowed. | |
// |
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
{ | |
:before => before, | |
:after => after, | |
:ref => ref, | |
:commits => [{ | |
:id => commit.id, | |
:message => commit.message, | |
:timestamp => commit.committed_date.xmlschema, | |
:url => commit_url, | |
:added => array_of_added_paths, |
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
-- returns `fn` which memoizes its arguments | |
local function memoize( fn ) | |
local cache = {} | |
local function memoize(...) | |
-- convert args into a string if they're a table | |
local args = {...} | |
local sArg = table.ToString(args) | |
-- get the item with the given arguments from the cache | |
local cached = cache[sArg] |