Skip to content

Instantly share code, notes, and snippets.

View 1lann's full-sized avatar

Jason Chu 1lann

View GitHub Profile
@1lann
1lann / rsa-keygen.lua
Last active October 11, 2015 10:54
RSA key generator in pure Lua for ComputerCraft
--
-- RSA Key Generator
-- By 1lann
--
-- Refer to license: http://pastebin.com/9gWSyqQt
--
--
-- Start of third-party libraries/helpers
--
@1lann
1lann / compress.go
Created July 4, 2015 09:04
LZ compression in Go
package compress
import (
"bytes"
"compress/lzw"
"io/ioutil"
)
func compress(input []byte) ([]byte, error) {
output := &bytes.Buffer{}
@1lann
1lann / effective power stacktrace.txt
Created May 31, 2015 17:14
Effective power stacktrace
Process: SpringBoard [67309]
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard
Identifier: SpringBoard
Version: 1.0 (50)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [67295]
Responsible: launchd_sim [67295]
User ID: 501
Date/Time: 2015-05-31 21:11:00.575 +0800
local vertexStart = {"RRLR", "RR", "", "L", "LRL", "LRLRL"}
local vertexRows = {6, 8, 11, 10, 8, 6}
local allVerticies = {}
for start = 1, #vertexStart do
local startTurn = "L"
if start == 3 then
startTurn = "S"
elseif start > 2 then
@1lann
1lann / round.c
Last active August 29, 2015 14:19
double myRound(double num, int decimalPlaces) {
int rounded = num * power10Of(decimalPlaces);
return (double)rounded / power10Of(decimalPlaces);
}