Skip to content

Instantly share code, notes, and snippets.

View jaredallard's full-sized avatar
🎯
Focusing

Jared Allard jaredallard

🎯
Focusing
View GitHub Profile
@jaredallard
jaredallard / string.split.lua
Created May 21, 2015 05:07
string.split in lua
-- split a string
function string:split(delimiter)
local result = { }
local from = 1
local delim_from, delim_to = string.find( self, delimiter, from )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from )
end
@jaredallard
jaredallard / docker.log
Created May 21, 2015 04:43
Output of a docker virtualized program in computercraft!
chroot: checking if 'usr/apis/package' file exists
chroot: fs: checking if 'usr/apis/package' exists
chroot: fs: checking if 'usr/apis/package' exists
chroot: fs: checking if 'usr/apis/package' exists
chroot: fs: checking if 'usr/apis/package' exists
chroot: checking if '/usr/bin' file exists
chroot: fs: checking if 'usr/bin' exists
chroot: os: package: register method 'new'
chroot: os: package: register method 'findDependencies'
chroot: os: package: register method 'list'
@jaredallard
jaredallard / LibDSA.lua
Last active June 1, 2019 20:11
DSA for Lua 5.1
--------------------------------------------------------------------------------------------
-- LUA Big Number Library
-- Created by Jayden Koedijk ([email protected])
-- Inspired by the works of Frederico Macedo Pessoa and Marco Serpa Molinaro.
-- Made for Lua 5.1 by Jared Allard <[email protected]>
-- Heavly optimised for the LUA implementation in World of Warcraft, minimizing
-- table creation/seeks and the use of external variables.
-- Numbers are stored as tables containing words of [radix length] decimal digits.
-- [0] being the most significant, [n-1] being the least: 1234567890 = {[0]=123,4567890}.
-- ["n"] stores the length of the number, words in indexes >= n may contain zeros, all
@jaredallard
jaredallard / utup-updater.json
Last active August 29, 2015 14:08
Text Updater / Config file
{
"dltype": "HTTPS",
"uri": "https://raw.githubusercontent.com/RainbowDashDC/uTUP/master/script.zip",
"filetype": "zip",
"updateServer": "https://gist.githubusercontent.com/RainbowDashDC/a02019867fbb0af22557/raw/95c06aee5f2119b671ff8c98046b8906f1f25c41/utup-updater.json",
"updateServerType": "HTTPS",
"version": "1.0.1",
"run": "script.js",
"filename": "script-dl.zip"
}
@jaredallard
jaredallard / ccLinux_code_standards
Last active August 29, 2015 14:06
All design specifications related to ccLinux and/or about it.
ccLinux code standards.
APIs: Must be object oriented.
Tabs/Spaces: Tab
All code __must__ be formatted correctly when contributing to ccLinux, otherwise your pull request /will/ be denied.
@jaredallard
jaredallard / main.js
Last active August 29, 2015 14:03
Gets any song from http://bronytunes.com/
// By RainbowDashDC
// Gets any song from http://bronytunes.com
//
// This relies on bronytunes, or another site (if being modified) having JQuery.
// If it does not have jquery, it WILL NOT work. Load it yourself.
$("#play_pause").click(); // this will play/pause it, needed for people who don't click it at first.
$("#songPlayer").attr("src"); // print out the src element of the audio element.