Skip to content

Instantly share code, notes, and snippets.

Damien Guard damieng

Block or report user

Report or block damieng

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
damieng /
Last active Apr 21, 2019
ZX to TTF font conversion shell script (required psftools modified, PixelWorld and FontLab Studio + scripts)
fl5reg="HKCU\Software\FontLab\Studio 5\Directories"
for i in "$@"
echo Processing $name
pw preview "$i" . >> /dev/null
zx2psf "$i" "${psf}" --mode=move1 --graphics=none
damieng / theghost.asm
Last active Nov 6, 2018
Ghost 48K compatibility for +2/+3 Sinclair ZX Spectrums
View theghost.asm
; Code by Mark Harris, published in Your Sinclair Issue 59
; Disassembly and comments by Damien Guard.
ORG 28000
; Setup pages to allow 48K ROM to be copied to RAM page 4.
LD A,0x14 ; 48K ROM at 0x0000, RAM page 4 at 0xc000
LD BC,0x7ffd ; 128K paging port
OUT (C),A ; Switch the pages
damieng / crystal-quest.unp
Last active Jul 22, 2018
Crystal Quest decompiled PAWS adventure
View crystal-quest.unp
PAW Database : CrystalQuest.z80
Extracted by UNPAWS32 v2.1
General data
Locations 49
Objects 60
damieng / jekyll1.unp
Created Jul 22, 2018
Dr. Jekyll & Mr Hide Part 1 decompiled
View jekyll1.unp
PAW Database : JEKYLL.sna
Extracted by UNPAWS32 v2.1
General data
Locations 25
Objects 15
damieng / config.yml
Last active Jun 3, 2018
CircleCI config for
View config.yml
version: 2
- image: circleci/ruby:2.3
working_directory: ~/jekyll
- JEKYLL_ENV=production
- JOB_RESULTS_PATH=run-results
damieng / algolia-search.html
Last active May 30, 2018
Algolia search from
View algolia-search.html
<script src=""></script>
<script src=""></script>
let searchForm = document.getElementById('search-form')
let hits = document.getElementById('hits')
let algolia = algoliasearch('{your-site-id}', '{your-search-token}')
let helper = algoliasearchHelper(algolia, '{your-index-name}', { hitsPerPage: 10, maxValuesPerFacet: 1, getRankingInfo: false })
helper.on("result", searchCallback)
function runSearch() {
damieng / download-with-fetch.ts
Created Feb 16, 2018
Download a file with progress indication using just window.fetch + node (TypeScript version)
View download-with-fetch.ts
import * as fs from 'fs';
// Public: Download a file and store it on a file system using streaming with appropriate progress callback.
// * `sourceUrl` Url to download from.
// * `targetFile` File path to save to.
// * `progressCallback` Callback function that will be given a {ByteProgressCallback} object containing
// both bytesDone and percent.
// * `length` Optional file length in bytes for cases where the server will not supply the
// Content-Length header but the value is known in advance. Without either the
damieng / Mehkee96.json
Last active Dec 17, 2017
Mehkee 96 bootmapper with split number/arrow area
View Mehkee96.json
"index": 103,
"label": "LCtrl"
"index": 104,
"label": "LShift"
damieng / LINQOrExpressionCombiner.cs
Created May 17, 2017
OR together LINQ expressions for Where clauses etc
View LINQOrExpressionCombiner.cs
class Or
public static Expression<Func<T, bool>> Combine<T>(Expression<Func<T, bool>> left, Expression<Func<T, bool>> right)
var parameter = Expression.Parameter(typeof(T), "p");
var combined = new ParameterReplacer(parameter).Visit(Expression.OrElse(left.Body, right.Body));
return Expression.Lambda<Func<T, bool>>(combined, parameter);
class ParameterReplacer : ExpressionVisitor
damieng / AwfulCSharpCode.cs
Created May 16, 2017
A sample C# file that messes with syntax highlighters
View AwfulCSharpCode.cs
extern alias b;
using System;
class A { public dictionary<int, String> func(int a) { } }
struct hi { byte q; int a = /* */ 1; char c = 'c'; }
void A() { }
#if ABC // Testing
/* Mult-line
comment */
public abstract class Outside { }
You can’t perform that action at this time.