Skip to content

Instantly share code, notes, and snippets.

View dangmoody's full-sized avatar

Dan Moody dangmoody

View GitHub Profile
@dangmoody
dangmoody / show-git-branch.bat
Last active May 5, 2025 00:13
Show current Git branch in Windows Terminal prompt
@echo off
REM
REM this script shows the current git branch inside Windows Terminal and CMD
REM you will need to add the following to the "target" argument of command prompt:
REM
REM /k show-git-branch.bat
REM
REM update when we change directories
@dangmoody
dangmoody / DCPU-16Spec.txt
Created May 16, 2023 13:54 — forked from metaphox/DCPU-16Spec.txt
DCPU-16 Specification
DCPU-16 Specification
Copyright 1985 Mojang
Version 1.7
=== SUMMARY ====================================================================
* 16 bit words
* 0x10000 words of ram
@dangmoody
dangmoody / timer.h
Created April 1, 2020 20:59
Small timer utility for C/C++
/*
Timestamp header library
by Dan Moody
Written to work for C99, so should work fine for C++.
INSTALLATION:
1. Download 'timer.h' and the corresponding .c file(s) for the platform(s) of your choosing.
@dangmoody
dangmoody / Default (Windows).sublime-keymap
Last active September 11, 2021 19:11
Sublime Text config files
[
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["alt+shift+r"], "command": "find_all_under" },
]
@dangmoody
dangmoody / keybindings.json
Last active January 28, 2021 08:13
VS Code config files
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "f7",
"command": "workbench.action.tasks.build"
},
{
"key": "ctrl+shift+b",
"command": "-workbench.action.tasks.build"
},
@dangmoody
dangmoody / int_types.h
Last active May 19, 2019 11:38
My int types header that I use everywhere in all my personal projects. This isn't worth a whole repo. The include overhead is really minimal, so there should be a low compile-time cost for plugging this header into apps.
#pragma once
#include <stdint.h>
#include <inttypes.h>
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;