Skip to content

Instantly share code, notes, and snippets.

View nickrobson's full-sized avatar
👨‍💻
beeping and booping

Nick Robson nickrobson

👨‍💻
beeping and booping
View GitHub Profile
@nickrobson
nickrobson / rom.js
Created January 17, 2016 02:36
Converts decimal numbers to roman numerals.
function convert(num) {
var map = [
[1, 1, 'I'],
[1, 5, 'V'],
[2, 10, 'X'],
[2, 50, 'L'],
[3, 100, 'C'],
[3, 500, 'D'],
[4, 1000, 'M'],
[4, 5000, ''],
@nickrobson
nickrobson / trident.sh
Last active August 29, 2015 14:25
Trident Workspace Fetcher (now can built TridentSDK & Trident using Maven)
tridentsdk="TridentSDK"
trident="Trident"
env="Env"
clear
# Print 'header' info
echo "\x1b[35;1m===================================="
echo "== Trident Workspace Fetcher v2.0 =="
echo "===================================="
@nickrobson
nickrobson / filecontents.c
Created March 27, 2015 01:20
Get the contents of a file.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
char fileName[30];
printf("Enter file name: ");
scanf("%s", fileName);
FILE* file = fopen(fileName, "r");
@nickrobson
nickrobson / colours.h
Last active August 29, 2015 14:17
colours!
//
// colours.h
// COMP1917
//
// Created by Nick Robson on 20/03/2015.
// Copyright (c) 2015 Nick Robson. All rights reserved.
//
#ifndef __COMP1917__colours__
#define __COMP1917__colours__