Skip to content

Instantly share code, notes, and snippets.

View carneeki's full-sized avatar

Adam carneeki

View GitHub Profile

Keybase proof

I hereby claim:

  • I am carneeki on github.
  • I am carneeki (https://keybase.io/carneeki) on keybase.
  • I have a public key whose fingerprint is D7D0 B442 AA63 ECBC F940 44DD 0156 19DB FBFE F9A8

To claim this, I am signing this object:

@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 / 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 / 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
{
"_comment": "Scons for atom build package",
"_instructions": "Simply copy+paste this file into the project root",
"cmd": "scons"
}
@carneeki
carneeki / UML.java
Created April 14, 2015 01:25
UML description
/**
* UML sucks
* @author Adam Carmichael <carneeki@carneeki.net>
* @since it was invented.
*/
@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 / 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 / Tachometer.java
Created February 2, 2013 20:27
possible tachometer for plugging in to PIDController / PIDSubsystem
package first.frc.landownunder.components;
import edu.wpi.first.wpilibj.Counter;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.PIDSource;
/**
* A tachometer using DigitalInput high pulses.
* @author carneeki
* @since 2012-02-03 05:05AEDT
@carneeki
carneeki / TEAM-4774-JAVATUT-000-HelloWorld.java
Last active December 10, 2015 09:09
HelloWorld - the classic first program to write.
class HelloWorld
{
public static void main (String[] args)
{
System.out.println("Hello World!");
}
}