Skip to content

Instantly share code, notes, and snippets.

date -u +"%Y-%m-%d_%H-%M-%S"
#include "DigiMouse.h"
void setup() {
// don't need to set anything up to use DigiKeyboard
// DemonSeed EDU per https://twitter.com/_MG_/status/1209883487353757697
// Enable D- pull-up resistor to attach DemonSeed EDU onto USB as a low-speed (1.5Mbit/s) device
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
[assembly: IgnoresAccessChecksTo("SecretProgram")]
colordiff -y <(xxd foo1.bin) <(xxd foo2.bin)
#!/usr/bin/bash
find . -name $'*\n*' -exec rename -n 's/\n//g' {} \;
@Fusion86
Fusion86 / ColorConsole.cs
Last active April 10, 2023 11:23 — forked from RickStrahl/ColorConsole.cs
Color Console - a simple class to add color to .NET Console commands more easily.
using System.Text.RegularExpressions;
namespace MainColorConsole
{
class Program
{
static void Main(string[] args)
{
ColorConsole.WriteWrappedHeader("Color Console Examples");
@Fusion86
Fusion86 / explorer.ahk
Created April 2, 2022 10:59
Place both in shell:startup
/*
Library for getting info from a specific explorer window (if window handle not specified, the currently active
window will be used). Requires AHK_L or similar. Works with the desktop. Does not currently work with save
dialogs and such.
Explorer_GetSelected(hwnd="") - paths of target window's selected items
Explorer_GetAll(hwnd="") - paths of all items in the target window's folder
Explorer_GetPath(hwnd="") - path of target window's folder
@Fusion86
Fusion86 / subs_rename.py
Created November 23, 2021 19:28
Shitty script to rename subtitle files to match the video naming format.
import os
import sys
import glob
import re
from typing import List
def find_video_files(dir: str):
return glob.glob(os.path.join(dir, "*.mp4")) + glob.glob(os.path.join(dir, "*.mkv"))
@Fusion86
Fusion86 / input.hs
Last active October 26, 2021 12:49
module Input (isKeyDown, handleInput) where
import Common
import Coordinates
import qualified Data.Set as S (Set, empty, delete, insert, member)
import Graphics.Gloss.Interface.IO.Game
import Model
data World = World
{ scene :: Scene,
import Graphics.Gloss
( Color,
Picture,
blank,
blue,
color,
white,
pictures,
rectangleSolid,
rgbaOfColor,