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
damieng / zx-font-publish.sh
Created Sep 12, 2019
ZX Spectrum font publishing
View zx-font-publish.sh
#!/bin/bash
#Requires 7z, bin2tap, custom FontTest.tap template and AWS-CLI. Tested on WSL.
for i in "$@"
do
name="${i%.*}"
zip="${name}.zip"
rm -rf "${zip}"
echo Creating previews
pw preview "$i" . >> /dev/null
@damieng
damieng / zx-font-convert.sh
Created Sep 12, 2019
ZX Spectrum font conversion script
View zx-font-convert.sh
#!/bin/bash
#Requires psftools, custom pw tool, custom FontLab template and FontLab studio. Windows only using WSL.
fl5reg="HKCU\Software\FontLab\Studio 5\Directories"
for i in "$@"
do
name="${i%.*}"
echo Processing $name
pw preview "$i" . >> /dev/null
psf="${name}.psf"
vfb="${name}.vfb"
@damieng
damieng / download-with-fetch.flow.js
Last active May 20, 2019
Download a file with progress indication using just window.fetch + node (FlowType version)
View download-with-fetch.flow.js
// @flow
import 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.
@damieng
damieng / zx-to-ttf.sh
Last active Apr 21, 2019
ZX to TTF font conversion shell script (required psftools modified, PixelWorld and FontLab Studio + scripts)
View zx-to-ttf.sh
#!/bin/bash
fl5reg="HKCU\Software\FontLab\Studio 5\Directories"
for i in "$@"
do
name="${i%.*}"
echo Processing $name
pw preview "$i" . >> /dev/null
psf="${name}.psf"
vfb="${name}.vfb"
zx2psf "$i" "${psf}" --mode=move1 --graphics=none
@damieng
damieng / WinDev.ps1
Last active Apr 6, 2019
Make Windows more developer-workstation oriented (includes removing crapware)
View WinDev.ps1
# Run this from Powershell as Administrator with (New-Object System.Net.WebClient).DownloadString("https://gist.github.com/damieng/881852e7112be7d97957/raw") | powershell -command -
Write-Output "Making Windows more developer oriented (Revision 26)..."
Set-ExecutionPolicy Unrestricted
if ([System.Environment]::OSVersion.Version.Major -ge 10) {
Write-Output " * Detected Windows 10"
Write-Output " * Removing Windows 10 bloatware"
$apps = @(
"Microsoft.3DBuilder"
@damieng
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 http://live.worldofspectrum.org/infoseek/magazines/your-sinclair/59#20
; Disassembly and comments by Damien Guard.
ORG 28000
; Setup pages to allow 48K ROM to be copied to RAM page 4.
DI
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
damieng / download-with-fetch.flow.js
Created Mar 13, 2017
Download a file using just window.fetch (flowtype version)
View download-with-fetch.flow.js
// @flow
import fs from 'fs';
export default async function download(sourceUrl: string, targetFile: string, progressCallback: ?ByteProgressCallback, length: ?number): Promise<void> {
const request = new Request(sourceUrl, {
headers: new Headers({'Content-Type': 'application/octet-stream'})
});
const response = await fetch(request);
@damieng
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
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
damieng / config.yml
Last active Jun 3, 2018
CircleCI config for damieng.com
View config.yml
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.3
working_directory: ~/jekyll
environment:
- JEKYLL_ENV=production
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- JOB_RESULTS_PATH=run-results
You can’t perform that action at this time.