Skip to content

Instantly share code, notes, and snippets.

Daniel Keep DanielKeep

Block or report user

Report or block DanielKeep

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gen-code.py
#!/usr/bin/env python3
import sys
if len(sys.argv) != 2:
print('Usage: gen-code.py LIMIT')
sys.exit(1)
LIMIT = int(sys.argv[1])
print(
@DanielKeep
DanielKeep / rustup.ps1
Last active Aug 29, 2015
rustup for PowerShell
View rustup.ps1
<#
.SYNOPSIS
Downloads Rust installers for Windows.
.DESCRIPTION
Tries to download the latest available release for a given version of the Rust compiler. It does this by checking the date the currently installed compiler was built against the timestamp of the remote installer. These do not always match up, so do not be surprised if this script keeps trying to re-download the same archive.
Once downloaded, provided you specified either 'exe' or 'msi', the script will run the installer for you.
@DanielKeep
DanielKeep / bintree.rs
Created Aug 2, 2015
Simple Binary Tree in Rust
View bintree.rs
use std::fmt;
#[derive(Debug)]
struct BinTree<T>
where T: Ord {
root: Option<Box<BinNode<T>>>,
}
#[derive(Debug)]
struct BinNode<T>
@DanielKeep
DanielKeep / __init__.py
Created Nov 7, 2012
JGLS (juggles) exporter for Blender 2.63
View __init__.py
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
View ssfs-spec.rst
@DanielKeep
DanielKeep / ReferenceImpl.BinaryImage.cs
Created May 3, 2012
Binary Image Exchange Format Proposal
View ReferenceImpl.BinaryImage.cs
/*
* Binary Image Exchange Format reference implementation.
*
* Note that not everything here has been exhaustively tested. There may be
* bugs a-lurkin'.
*
* This implementation is written to conform to version 1.0.3 of the BIEF spec.
*
* Latest version:
* https://gist.github.com/2585085
View testfloppy.dasm16
You can get a pre-generated disk image here:
http://ompldr.org/vZGlzZA/hello.zip
@DanielKeep
DanielKeep / HIT_HMD2043.txt
Created Apr 26, 2012
Harold Innovation Technologies - HMD2043 and HMU1440 spec sheets
View HIT_HMD2043.txt
HIT_HMD2043
__ __
|| ||
||==|| I T
_|| ||_
Harold Innovation Technologies
"If it ain't a HIT, it's a piece of..."
@DanielKeep
DanielKeep / dcpufont.py
Created Apr 24, 2012
Python script to convert the DCPU font from PNG to something directly useable.
View dcpufont.py
"""
DCPU Font converter.
Written by Daniel Keep <daniel.keep@gmail.com>.
Released under the MIT license.
"""
from PIL import Image
@DanielKeep
DanielKeep / native.cairo.ouro
Created Mar 15, 2011
Test of Ouro's native function support, using Cairo.
View native.cairo.ouro
import "/ouro/ast" : *
import "/ouro/stdio" : *
(--
These functions haven't been exposed via a module yet, so I have to bind them
manually. The '~' means the function modifies the environment.
--)
let loadLibrary~ = __builtin__("ouro.native.loadLibrary")
let loadFunction~ = __builtin__("ouro.native.loadFunction")
let invoke~ = __builtin__("ouro.native.invoke")
You can’t perform that action at this time.