Skip to content

Instantly share code, notes, and snippets.

@Measter
Measter / gist:f6ffeac26a05b61f6966
Last active August 29, 2015 14:13
Extra-Crappy Birds for Easy68K
*-----------------------------------------------------------
* Title : Less-Extra-Crappy Birds
* Description: A port of the JS version found at
* https://www.ktbyte.com/java-tutorial/game-walkthroughs
*
* Revisions : 1.0 Release
* : 1.1 Pretty Pipes
* Evened out wall distances.
* Pretty Bird.
* Better "Colours".
@Measter
Measter / gist:90a0f0bb77749a058b9b
Last active August 29, 2015 14:14
Prime Visualiser
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Net.Mime;
namespace ConsoleTestApp
{
public class PrimeVisualiser
{
using System;
using System.Collections.Generic;
using System.IO;
namespace ConsoleTestApp
{
class Program
{
private static Dictionary<int, Decimal> m_count = new Dictionary<int, Decimal>();
@Measter
Measter / EU4RevFlagRenderer.cs
Created February 27, 2015 15:50
EU4 Revolutionary Flag Generator
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using Measter;
namespace ConsoleTestApp
{
internal class EU4RevFlagRenderer
Color refColor = Color.FromArgb( 255, 200, 200, 200 );
Bitmap bmp = new Bitmap( 4,4, PixelFormat.Format16bppRgb555 );
bmp.SetPixel( 2,2, refColor );
Color retCol = bmp.GetPixel( 2, 2 );
@Measter
Measter / brainfuck.x86
Last active August 29, 2015 14:23
Brainfuck Assembler
*-----------------------------------------------------------
* Title : Brainfuck Assembler
* Written by : Stuart Haidon
* Date : 2015-06-16
* Versions:
* 1.0: Release
* 1.1: Changed JMP instruction in assembled program to RTS.
* 1.2: Now handles mis-matched brackets.
*-----------------------------------------------------------
C-CPU Assembler Listing
Created on 09/11/2016 00:39:18
0000 1 ; Test C-CPU Assembly
0000 2
0000 9380 3 seti r3, outLoc ; Output location.
0001 4
0001 9205 5 seti r2, 5 ; Counter.
0002 9900 00A0 6 seti.l r1, hA0
0004 9001 7 seti r0, 1
*-----------------------------------------------------------
* Title : Memory Allocator
* Written by : Stuart Haidon
* Date : 2015-06-11
*-----------------------------------------------------------
MEM_NULL_PTR equ -1
MEM_MAGIC_NUMBER equ $6D61
MEM_HEADER_SIZE equ 14
@Measter
Measter / script.ps1
Last active February 11, 2017 15:23
echo "List iteration:"
"first", "second", "I'll do it!" | foreach {"The $_ item"}
echo ""
echo "Reading values from a command:"
cat ".\myfile.txt" | foreach {$_}
echo ""
echo "Field separator:"
cat ".\myOtherFile.txt" -Delimiter ":" | foreach {$_.TrimEnd(':')}
use std::io;
use std::io::BufRead;
use std::time::SystemTime;
fn main() {
let start_time = SystemTime::now();
let mut count = 0;
let mut num_words = 0;
let mut num_chars = 0;