Skip to content

Instantly share code, notes, and snippets.

Adam Gashlin hcs64

Block or report user

Report or block hcs64

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 gist:9393705
// first byte
if (_mod_packets)
{
// need to rebuild packet type and window info
if (!mode_blockflag)
{
throw Parse_error_str("didn't load mode_blockflag");
}
@hcs64
hcs64 / gs_arduino_direct.ino
Created Jul 10, 2014
gsuploader via arduino
View gs_arduino_direct.ino
#include <string.h>
#define DIRECT 1
#define VERIFY 0
const int out_pins[5] = {3,2,0,1,4};
const int in_pins[5] = {22,21,20,19,18};
void setup_pins() {
for (int i = 0; i < 5; i++) {
@hcs64
hcs64 / PKGBUILD
Last active Aug 29, 2015
Spell checking fix for pygtkspellcheck as embedded in CherryTree 0.33.4
View PKGBUILD
# $Id$
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Bartłomiej Piotrowski
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Tomas A. Schertel <tschertel@gmail.com>
# Contributor: Adam Gashlin <agashlin@gmail.com>
pkgname=cherrytree
pkgver=0.33.4
View canonical_huffman_counts.py
#!/usr/bin/python2
# Adam Gashlin
# compute number of possible canonical Huffman trees
from math import log, pow, factorial, ceil
from sys import argv
def f(n):
return sum(map(lambda i: g(n, i), range(2,n+1)))
@hcs64
hcs64 / xmash_wav.diff
Last active Aug 29, 2015
make xmash 0.8 output wave files usable with (modified) ffmpeg
View xmash_wav.diff
diff -r -u xmash08/xma_rebuild.c xmash08-mod/xma_rebuild.c
--- xmash08/xma_rebuild.c 2011-03-11 09:37:38.000000000 -0500
+++ xmash08-mod/xma_rebuild.c 2015-01-22 03:06:44.643157479 -0500
@@ -36,6 +36,44 @@
static long parse_frames(struct bitstream_reader *ibs, unsigned int frame_count, bool known_frame_count, unsigned int * total_bits_p, unsigned int max_bits, bool stereo, bool strict, bool verbose);
static int packetize(struct bitstream_reader *ibs, struct bitstream_writer *obs, struct xma_build_context * ctx, unsigned int frame_count, bool strict, bool last);
+uint8_t *make_wav_header(uint32_t srate, uint32_t size, int channels)
+{
+ uint8_t *h = malloc(wav_header_size);
@hcs64
hcs64 / NES0A.hs
Created Mar 23, 2015
NES CHR-ROM pattern table renderer
View NES0A.hs
-- output PGM (greyscale) image representation of NES CHR-ROM pattern tables
-- usage: NES0A smb.nes [bank to use, default 0]
-- This represents my first attempt at Haskell, please forgive me.
module Main where
import qualified Data.ByteString.Lazy as BL
import Data.Binary.Get
import Data.Bits
import Data.Word
@hcs64
hcs64 / readme.txt
Last active Apr 7, 2016 — forked from anonymous/readme.txt
Add Man 2
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@hcs64
hcs64 / script.txt
Last active Apr 15, 2017
Time Loop
View script.txt
title Time Loop wip
author Adam Gashlin
homepage gashlin.net
key_repeat_interval 0.25
========
OBJECTS
========
@hcs64
hcs64 / script.txt
Last active Mar 17, 2018
Net ported to PuzzleScript
View script.txt
title Net
(
An implementation of Simon Tatham's "Net" [0]
Simon says [1] "I originally saw this in the form of a Flash game called
FreeNet [2], written by Pavils Jurjans; there are several other
implementations under the name NetWalk."
This PuzzleScript port is by Adam Gashlin.
@hcs64
hcs64 / script.txt
Last active Apr 25, 2016
Add Man 3
View script.txt
title Add Man 3: Heavy Math (wip)
author Adam Gashlin
homepage gashlin.net
key_repeat_interval 0.25
noaction
run_rules_on_level_start
========
OBJECTS
You can’t perform that action at this time.