Skip to content

Instantly share code, notes, and snippets.

View Halkcyon's full-sized avatar
🦀

Maximilian Burszley Halkcyon

🦀
View GitHub Profile
@Halkcyon
Halkcyon / .editorconfig
Created September 17, 2019 15:54
My C# preferences
# https://editorconfig.org/#supported-properties
# https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2017#supported-settings
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
@Halkcyon
Halkcyon / profiles.jsonc
Created April 19, 2020 22:34
Windows Terminal settings w/ Nord Theme and Nerd Fonts
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"confirmCloseAllTabs": false,
"requestedTheme": "dark",
"wordDelimiters": " _/\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502",
"profiles": {
"defaults": {
@Halkcyon
Halkcyon / giphy-reddit.user.js
Last active December 23, 2020 00:00
Creates a button to copy Reddit markdown to clipboard from Giphy for embedding gifs in Reddit comments.
// ==UserScript==
// @noframes
// @name giphy-reddit
// @namespace mburszley
// @description Creates a button to copy Reddit markdown to clipboard from Giphy for embedding gifs in Reddit comments.
// @grant clipboardWrite
// @match https://giphy.com/*
// @version 6
// @downloadURL https://gist.github.com/mburszley/1474687f8447495b3ea724c9ea97bebb/raw/giphy-reddit.user.js
// @updateURL https://gist.github.com/mburszley/1474687f8447495b3ea724c9ea97bebb/raw/giphy-reddit.user.js
A_SCRIPT_CAPS = ord("\N{MATHEMATICAL BOLD SCRIPT CAPITAL A}")
A_SCRIPT_SMALL = ord("\N{MATHEMATICAL BOLD SCRIPT SMALL A}")
A_CAPS = ord('A')
A_SMALL = ord('a')
RANGE_CAPS = range(A_CAPS, A_CAPS+26)
RANGE_SMALL = range(A_SMALL, A_SMALL+26)
def cursive(s: str) -> str:
for i, v in enumerate(chars := list(map(ord, s))):
if v in RANGE_CAPS:
@Halkcyon
Halkcyon / wrapper.cmd
Created February 9, 2021 03:54
A PowerShell Batch wrapper
# 2>NUL & @CLS & PUSHD "%~dp0" & "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -nol -nop -ep bypass "[IO.File]::ReadAllText('%~f0')|iex" & POPD & EXIT /B
<#
@
Stops a command from echoing to the console host.
# 2>NUL & @CLS
This allows us to comment out the batch wrapper part from the powershell script and eats the cmd.exe error since # is not a command or control character.
PUSHD "%~dp0"
@Halkcyon
Halkcyon / main.rs
Created December 2, 2023 16:59
AOC 2023 Day 02
#![allow(dead_code)]
use std::{env::current_dir, fs};
use nom::{IResult, bytes::complete::{tag, take_until, take_while1}, branch::alt, multi::separated_list0};
pub fn main() -> color_eyre::Result<()> {
let pwd = current_dir()?;
let input = fs::read_to_string(pwd.join("input/y2023/d02.txt"))?;