Skip to content

Instantly share code, notes, and snippets.

@cjtallman
cjtallman / fibonacci.lua
Created December 19, 2017 21:33
Fast Fibonacci
local function matmul(a, b)
return {
a[1]*b[1] + a[2]*b[3], a[1]*b[2] + a[2]*b[4],
a[3]*b[1] + a[4]*b[3], a[3]*b[2] + a[4]*b[4],
}
end
local function matpow(m,p)
local r = {
m[1], m[2],
@cjtallman
cjtallman / ASyncCallback.hpp
Last active November 11, 2016 22:38
Threaded callback wrapper in C++11
///////////////////////////////////////////////////////////////////////////////
///
/// @copyright Copyright (c) 2016 Chris Tallman.
///
/// @file ASyncCallback.hpp
/// @date 11/11/2016
/// @author ctallman
///
/// @brief Threaded callback wrapper class.
///
@cjtallman
cjtallman / README.md
Last active February 24, 2024 01:12
Vagrant Gitlab Server

Vagrant Gitlab Server

Quickly set up a local Gitlab CE server using Vagrant.

Run vagrant up to setup the virtual server.

Server Details

  • Ubuntu 16.04
  • Installs latest Docker
@cjtallman
cjtallman / ProFi.lua
Last active September 28, 2015 18:35 — forked from perky/ProFi.lua
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()