Skip to content

Instantly share code, notes, and snippets.

View damieng's full-sized avatar
🏠
Working from home

Damien Guard damieng

🏠
Working from home
View GitHub Profile
@damieng
damieng / mehkee96damieng.json
Created March 11, 2023 01:54
My Mehkee 96 custom map
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "mehkee96",
"keymap": "mehkee96_layout_mine",
"layout": "LAYOUT",
"layers": [
[
"KC_ESC",
@damieng
damieng / BinarySubset.cs
Created February 3, 2023 15:31
Find matching binary parts of a file regardless of offset
namespace BinarySubset
{
internal class Program
{
static void Main(string[] args)
{
const int minBytes = 15;
const int minUniques = 5;
var uniqueBytes = new bool[256];
@damieng
damieng / slack-invite-process.py
Created February 3, 2023 15:27
Process Slack Invite JSON
#!/usr/bin/env python3
from collections import defaultdict
from json import loads
from sys import argv, stdin
from pprint import pprint
inviters = defaultdict(list)
for invite in loads(stdin.read()):
inviters[invite['invitedBy']].append(invite['user'])
@damieng
damieng / SportsScrape.cs
Created February 3, 2023 15:26
Basic scraping example in C#
using HtmlAgilityPack;
namespace ScapeSports;
internal class Program
{
static void Main(string[] args)
{
var start = new Uri("https://www.sportsengine.com/search/listings?code=98052");
@damieng
damieng / cmdr-settings.json
Last active May 4, 2022 16:57
My Cmdr settings for Windows Terminal
{
"profiles":
{
"defaults": {},
"list":
[ {
"antialiasingMode": "grayscale",
"colorScheme": "Dracula",
"commandline": "cmd.exe /k c:/apps/cmdr/vendor/init.bat",
"cursorHeight": 35,
@damieng
damieng / pfiler.cs
Last active December 2, 2021 18:20
ZX Spectrum P-File decoder (incomplete)
using System;
using System.IO;
using System.Linq;
using System.Text;
internal class Program
{
static void Main(string[] args)
{
var pFileName = "EasyList.P";
@damieng
damieng / zxspectrumpd.md
Created December 2, 2021 12:37
Spectrum Public Domain
@damieng
damieng / fix-yml-multiline.js
Created November 9, 2021 16:11
Fix my yaml files that had multiline "message:" key at the end using quotes not | and indents like it should
const Glob = require('glob').Glob
const process = require('process')
const fs = require('fs')
const path = process.argv[2]
Glob(path, {}, (err, files) => {
let count = 0;
for (let file of files) {
const lines = fs.readFileSync(file, 'utf-8').trim().split('\n')
@damieng
damieng / settings.json
Created October 11, 2021 13:04
Cmder configuration for Windows Terminal
{
"profiles":
{
"list":
[
{
"acrylicOpacity": 0.9,
"antialiasingMode": "grayscale",
"colorScheme": "Dracula",
"commandline": "cmd.exe /k c:/apps/cmder/vendor/init.bat",
@damieng
damieng / Damien-Best.vpl
Created October 9, 2021 09:54
Best C64 colour palette for VICE
#
# VICE Palette file
#
# Syntax:
# Red Green Blue Dither
#
# Black
00 00 00 0