Skip to content

Instantly share code, notes, and snippets.

View AaronC81's full-sized avatar

Aaron Christiansen AaronC81

View GitHub Profile
/// Part 1
/// [X] Allow child to be registered under each category for a single day
/// [X] Calculate the daily bill for a single child
/// Part 2
/// [ ] Create timesheets for an entire week
/// [ ] Calculate the weekly income for a single child
/// [ ] Format the output such that a bill can be given to a parent.
/// Rules
/// - If a child stays for AM, PM and lunch, they get a discount of £2
@AaronC81
AaronC81 / mem.nasm
Created March 25, 2017 17:51
Allocating Memory in NASM
global _main
extern _ExitProcess@4
extern _MessageBoxA@16
extern _GetProcessHeap@0
extern _HeapAlloc@12
section .text
_main:
; Place heap in eax
@AaronC81
AaronC81 / index.html
Created May 7, 2017 10:51
SO #43830559
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Emscripten-Generated Code</title>
<style>
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
textarea.emscripten { font-family: monospace; width: 80%; }
div.emscripten { text-align: center; }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
var BhhsToken;
function BhhsInit() {
BhhsToken = localStorage.getItem("BhhsToken");
}
function BhhsLoginRequired(callback) {
$.get("http://bhhssite.azurewebsites.net/api/loginRequired/" + BhhsToken, callback);
}
var BhhsToken;
function BhhsInit() {
BhhsToken = localStorage.getItem("BhhsToken");
}
function BhhsLoginRequired(callback) {
$.get("http://bhhssite.azurewebsites.net/api/loginRequired/" + BhhsToken, callback);
}
type
X = ref object of RootObj
Y = ref object of X
func inspect(x: X) =
if x is X:
echo("It's an X")
else:
echo("It's a Y")
type
X = ref object of RootObj
Y = ref object of X
proc inspect(x: X) =
if x is X:
echo("It's an X")
else:
echo("It's a Y")
@AaronC81
AaronC81 / eulerToQuaternion.js
Created May 16, 2018 14:52
Euler to Quaternion in JavaScript, designed for Snapchat Lens Studio
global.eulerToQuaternion = function (heading, attitude, bank) {
var c1 = Math.cos(heading / 2)
var c2 = Math.cos(attitude / 2)
var c3 = Math.cos(bank / 2)
var s1 = Math.sin(heading / 2)
var s2 = Math.sin(attitude / 2)
var s3 = Math.sin(bank / 2)
return new quat(
c1 * c2 * c3 - s1 * s2 * s3,
s1 * s2 * c3 + c1 * c2 * s3,
@AaronC81
AaronC81 / ieeetranc.bst
Last active November 4, 2018 15:03
Modified IEEE BibTeX Configuration with Reference Comments (use like @book{..., comment={A comment}})
%%
%% IEEEtranc.bst
%% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted)
%% Version 1.14 (2015/08/26)
%%
%% Copyright (c) 2003-2015 Michael Shell
%% Modified by Aaron Christiasen
%%
%% Original starting code base and algorithms obtained from the output of
%% Patrick W. Daly's makebst package as well as from prior versions of