Skip to content

Instantly share code, notes, and snippets.

View jaredallard's full-sized avatar
:shipit:

Jared Allard jaredallard

:shipit:
View GitHub Profile
@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.
@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 / 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 / LibDSA.lua
Last active June 1, 2019 20:11
DSA for Lua 5.1
--------------------------------------------------------------------------------------------
-- LUA Big Number Library
-- Created by Jayden Koedijk (elcius@gmail.com)
-- Inspired by the works of Frederico Macedo Pessoa and Marco Serpa Molinaro.
-- Made for Lua 5.1 by Jared Allard <jaredallard@outlook.com>
-- 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 / 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 / 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 / rootfs.ccdocker.fs
Created May 23, 2015 06:20
craftos; docker style!
{"inodes":{"":{"children":["root"],"isDir":true,"parents":[],"size":0},"root":{"children":["startup","programs","help","apis"],"isDir":true,"name":"root","parents":["/root"],"size":0},"root/apis":{"children":["colors","colours","disk","gps","help","io","keys","paintutils","parallel","peripheral","rednet","term","textutils","vector","window"],"isDir":true,"name":"apis","parents":["/root","/root/apis"],"size":0},"root/apis/colors":{"data":"LS0gQ29sb3JzCndoaXRlID0gMQpvcmFuZ2UgPSAyCm1hZ2VudGEgPSA0CmxpZ2h0Qmx1ZSA9IDgKeWVsbG93ID0gMTYKbGltZSA9IDMyCnBpbmsgPSA2NApncmF5ID0gMTI4CmxpZ2h0R3JheSA9IDI1NgpjeWFuID0gNTEyCnB1cnBsZSA9IDEwMjQKYmx1ZSA9IDIwNDgKYnJvd24gPSA0MDk2CmdyZWVuID0gODE5MgpyZWQgPSAxNjM4NApibGFjayA9IDMyNzY4CgpmdW5jdGlvbiBjb21iaW5lKCAuLi4gKQogICAgbG9jYWwgciA9IDAKICAgIGZvciBuLGMgaW4gaXBhaXJzKCB7IC4uLiB9ICkgZG8KICAgICAgICByID0gYml0LmJvcihyLGMpCiAgICBlbmQKICAgIHJldHVybiByCmVuZAoKZnVuY3Rpb24gc3VidHJhY3QoIGNvbG9ycywgLi4uICkKCWxvY2FsIHIgPSBjb2xvcnMKCWZvciBuLGMgaW4gaXBhaXJzKCB7IC4uLiB9ICkgZG8KCQlyID0gYml0LmJhbmQociwgYm
@jaredallard
jaredallard / cext.lua
Created May 31, 2015 05:22
ccDocker's cext fs implementation in the works!
--[[
A lightweight ext-like FS implemented in pure lua.
Specs: <insert link here>
@author Jared Allard <jaredallard@outlook.com>
@license MIT
@notice uses JSDoc like insource documention.
]]
@jaredallard
jaredallard / cext.lua
Created June 5, 2015 23:30
Almost done cext implementation
--[[
A lightweight ext-like FS implemented in pure lua.
Specs: <insert link here>
@author Jared Allard <jaredallard@outlook.com>
@license MIT
@notice uses JSDoc like insource documention.
]]
D5AEF0F4E0FB082199B8CD3EE43589CA943F1D47A0D6DCA803543B22C7B17E46AABD12943857