Skip to content

Instantly share code, notes, and snippets.

View james-pre's full-sized avatar

James Prevett james-pre

View GitHub Profile
@james-pre
james-pre / typescript+5.9.3.patch
Last active January 26, 2026 21:07
Patch file to add microsoft/TypeScript#63008 to TS 5.9.3
diff --git a/node_modules/typescript/lib/_tsc.js b/node_modules/typescript/lib/_tsc.js
index 612a1f7..53fa32a 100644
--- a/node_modules/typescript/lib/_tsc.js
+++ b/node_modules/typescript/lib/_tsc.js
@@ -7563,6 +7563,7 @@ var Diagnostics = {
Compiles_the_current_project_with_additional_settings: diag(6929, 3 /* Message */, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."),
true_for_ES2022_and_above_including_ESNext: diag(6930, 3 /* Message */, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."),
List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, 1 /* Error */, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."),
+ Import_JSON_files_as_const_assertions: diag(6933, 3 /* Message */, "Import_JSON_files_as_const_assertions_6933", "Import JSON files as const assertions."),
Variable
@james-pre
james-pre / aliases.sh
Last active March 28, 2025 07:09
Useful `git` aliases
#!/bin/bash
# Adds some useful git aliases
echo "Adding aliases"
# Lists changes (i.e. commit messages)
# "- " prefixed before each line after any whitespace for easily making a markdown list
# You can optionally provide from and to tags.
# `git ls-changes` will list changes from the last tag to HEAD
# `git ls-changes tag_a` will list changes from tag_a to HEAD
@zaxbux
zaxbux / gdocs.xml
Last active June 12, 2024 11:40
File Types
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/vnd.google-apps.document">
<comment>Google Docs</comment>
<glob pattern="*.gdoc" />
</mime-type>
<mime-type type="application/vnd.google-apps.drawing">
<comment>Google Drawings</comment>
<glob pattern="*.gdraw" />
</mime-type>
@guss77
guss77 / powerdraw
Last active September 14, 2025 16:40
Show total current power draw of the PC on Linux, using powercap
#!/bin/bash
#
# Installation:
# 1. put this script somewhere in your path - `/usr/local/bin/powerdraw` is probably
# a good idea.
# 2. Give the script execution permissions, e.g. `sudo chmod a+x /usr/local/bin/powerdraw`
# 3. Optional - add a sudoers file to allow users to execute this file without typing their
# password over and over. For example, create `/etc/sudoers.d/allow-powerdraw` with the
# following content:
# %admin ALL = NOPASSWD: /usr/local/bin/powerdraw, /usr/local/bin/powerdraw -f
@JBlond
JBlond / bash-colors.md
Last active February 25, 2026 16:46 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple