Skip to content

Instantly share code, notes, and snippets.

View Longlius's full-sized avatar

Matthew Longley Longlius

View GitHub Profile
@Longlius
Longlius / demo.c
Last active December 14, 2015 03:38
Demo C program for Wes
#include <stdio.h>
int main(void)
{
int i;
for (i = 0; i < 10; ++i) {
puts("Hello, world!");
}
@Longlius
Longlius / unsxlic.txt
Created February 24, 2013 08:58
UnSX License
(C)<Year>, <Author(s)> [of <Organization>]
All lefts, rights, ups and downs reversed.
This code may be modified and/or redistributed, as long as the conditions of
the UnSX License for Software v2 are met:
1. Redistributed packages must retain this LICENSE file and any
documentation that was included in the original. This is also true for
precompiled binary distributions.
2. In the event of a redistribution of code or a binary package, the
@Longlius
Longlius / sumsqrmad.asm
Last active December 14, 2015 09:19
an example of absolute madness for Wes (assembly programming)
ORG 0
START RWD . Read input
STA START . Some men just want to watch the world burn
LDA ZERO . Init ACC to 0
LDX START,2
SQRE LDX START,1 . START = number to square
MULT ADD START . Add START to itself START times
TDX MULT,1 . errbody in the club gettin' tipsy
RSUM TDX CSUM,2 . Decrement ir2. When ir2 == 0, gratz.
WWD . DELICIOUS I/O OM NOM NOM
// Name: Matthew Longley
// Due: 2012/04/18
// Course: COMP 3715-001
// Asg: Game project
public class PickNextMoveMatthewLongley implements PickNextMove
{
// Nested class - ChoiceTree
// Description: Represents a search tree for the game
// Members:
@Longlius
Longlius / derpybot.lisp
Created August 23, 2013 03:51
excerpt from derpybot
;;;; derpybot.lisp - main program file
(in-package #:derpybot)
;;; TOP-LEVEL DEFINITIONS
;;; *irc-host* - hostname of IRC server to connect to
(defparameter *irc-host* (string "irc.rizon.net"))
;;; *irc-port* - port number of IRC server to connect to
(defparameter *irc-port* 6660)
;;; *irc-nick* - nick for the bot to connect with
(defparameter *irc-nick* (string "DerpyBot"))
@Longlius
Longlius / gpstestsketch2.ino
Created March 9, 2016 23:57
Arduino-based GPS logger code
#include <SD.h>
#include <TinyGPS.h>
#include <SoftwareSerial.h>
SoftwareSerial shield(2,3); // configure software serial port
// Create an instance of the TinyGPS object
TinyGPS gps;
void setup()
{
@Longlius
Longlius / protocolsiojson.json
Created February 16, 2017 15:57
An example of protoocls.io json output
{
"api_version": "1",
"is_new_mode": "0",
"protocol_name": "Construction of microarrays and their application to virus analysis",
"last_modified": "1485996809",
"type_id": "1",
"link": "http://www.aslo.org/books/mave/MAVE_034.pdf",
"fork_id": "",
"public_fork_note": "",
"number_of_steps": "0",
@Longlius
Longlius / protocolsiojsonwithsteps.json
Created February 16, 2017 16:01
An example of protocols.io JSON output with steps included.
{
"api_version": "1",
"is_new_mode": "1",
"protocol_name": "Transformation of Skeletonema marinoi using Multipulse Electroporation",
"last_modified": "1487254340",
"type_id": "1",
"link": "",
"fork_id": "",
"public_fork_note": "",
"number_of_steps": "7",
Protocol ID: 1022
{"status_code":1002,"error_message":"Bad or missing protocol_id"}
Protocol ID: 4096
{"status_code":1002,"error_message":"Bad or missing protocol_id"}
{
"1022": {
"status_code": 1002,
"error_message": "Bad or missing protocol_id"
},
"4096": {
"status_code": 1002,
"error_message": "Bad or missing protocol_id"
},
"5038": {