Skip to content

Instantly share code, notes, and snippets.

View carneeki's full-sized avatar

Adam carneeki

View GitHub Profile
@carneeki
carneeki / throbber.cpp
Last active August 29, 2015 14:11
Text throbber / waiting thingy
#include <iostream>
#define SLEEP 100000 // 100 millis
using namespace std;
void throb(char in)
{
cout << "\b" << in;
cout.flush();
@carneeki
carneeki / autonomousExample.java
Last active August 29, 2015 14:15
Autonomous Robot Example demonstrating while(), Timers and Talons
public class Robot
{
/* There will be some code here to initialise the robot
* but I can't remember what it is off the top of my head.
* Eclipse will automatically generate it for us though. :)
*/
public void autonomous()
{
Talon leftTalon = new Talon(2);
@carneeki
carneeki / UML.java
Created April 14, 2015 01:25
UML description
/**
* UML sucks
* @author Adam Carmichael <carneeki@carneeki.net>
* @since it was invented.
*/
{
"_comment": "Scons for atom build package",
"_instructions": "Simply copy+paste this file into the project root",
"cmd": "scons"
}
@carneeki
carneeki / 0_README
Last active August 29, 2015 14:26
COMP202 Makefiles
Set up directory layout something like this:
/home/<username>/src/comp202
.
├── lec
│   └── week01
├── Makefile
├── Makefile.mk
├── prac
│   └── week01
@carneeki
carneeki / Makefile
Last active September 3, 2015 11:37
include Makefile.mk
# INIT targets
stage1-init:
mkdir stage1
touch stage1/stage1.c
cp stage1.mk stage1/Makefile
stage2-init:
mkdir stage2
@carneeki
carneeki / numbering systems
Created July 25, 2012 13:06 — forked from anonymous/numbering systems
numbering systems section
\part{Number Systems, Operations, and Codes}
\section{Number Systems}
For most of us we have only ever known one numbering system, decimal
and for that reason it can be easy to overlook the arbitrary nature
of such a system but more importantly it can be easy to overlook the
fact it isn't the only one.
@carneeki
carneeki / rtm.tex
Created October 4, 2012 19:47
Requirements Traceability Matrix
\chapter{Requirements Traceability Matrix}
\begin{table}[!htb]
\rowcolors{2}{gray!12.5}{white}
\begin{tabularx}{\linewidth}{ c c c l c X }
ID & From-ID & To-ID & Type & Build \# & Use Case/Class etc\ldots \\ \hline
\texttt{X-YY-nn} & \texttt{X-YY-nn} & \texttt{X-YY-nn} & Type & Build Number &
Use Case Name \\
\texttt{X-YY-nn} & \texttt{X-YY-nn} & \texttt{X-YY-nn} & Type & Build Number &
Use Case Name \\
\texttt{X-YY-nn} & \texttt{X-YY-nn} & \texttt{X-YY-nn} & Type & Build Number &
@carneeki
carneeki / letterati.c
Created October 28, 2015 14:32
Scan dictionary for words that have letters adding up to 100
#define _GNU_SOURCE // F U RMS... won't compile without this!
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Inspired by a silly meme that tries to connect the alphabet and corresponding
* letters with numbers (A=1, B=2, ... Z=26) such that "HARDWORK" and "KNOWLEDGE"
* are insufficient, and only "ATTITUDE" = 100%.
*/
@carneeki
carneeki / TEAM-4774-JAVATUT-001-LoopWhile.java
Last active December 10, 2015 09:08
Demonstrate loops using while
/*
* loopWhile
* Demonstrate loops using the 'while' structure
*/
class loopWhile
{
public static void main (String[] args)
{
int i=1; // here we create our counter called i.