Skip to content

Instantly share code, notes, and snippets.

@darklinden
darklinden / converting_dmg_iso.md
Created October 11, 2025 07:23 — forked from corysolovewicz/converting_dmg_iso.md
Converting DMG to ISO or CDR to ISO on macOS
@darklinden
darklinden / setup-zsh-in-codespaces.md
Created September 5, 2025 07:01 — forked from ikrishagarwal/setup-zsh-in-codespaces.md
Setup starship, zsh suggestions and syntax highlight for your codespaces.
@darklinden
darklinden / start-vbox.bat
Created September 3, 2025 02:01
Auto Start VirtualBox VM
@REM C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\start-vbox.bat
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "Debian" --type headless
@darklinden
darklinden / git-bash.bat
Created August 16, 2025 03:20
CommandLine To Git-Bash
@REM follow https://stackoverflow.com/questions/12870928/mac-bash-git-ps1-command-not-found
@REM download https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
@REM to C:\Program Files\Git\etc\git-prompt.sh
@REM add `. /etc/git-prompt.sh` to your .bashrc or .bash_profile
@REM download https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
@REM to C:\Program Files\Git\etc\git-completion.bash
@REM add `. /etc/git-completion.bash` to your .bashrc or .bash_profile
@echo off
setlocal enableextensions
@darklinden
darklinden / Disable-LegacyRightClickMenu.ps1
Created November 19, 2024 04:11 — forked from webtroter/Disable-LegacyRightClickMenu.ps1
Windows 11 Right Click Menu - Enable and Disable the old/legacy menu with PowerShell
Get-Item "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" | Remove-Item -Force -Recurse
Restart-Computer -Confirm
@darklinden
darklinden / ActionLookupTable.cs
Created September 2, 2024 02:00 — forked from jmschrack/ActionLookupTable.cs
A simple, thread-safe lookup table for Actions that generate guaranteed unique keys.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
///<summary> A simple lookup table that generates guaranteed unique keys. Thread Safe. </summary>
public class ActionLookupTable<E>{
private long lastTimeStamp=-1;
Dictionary<long,Action<E>> table = new Dictionary<long, Action<E>>();
@darklinden
darklinden / caddyfile
Last active June 12, 2024 02:59
caddyfile for simple file server
# docker-compose.yml
version: "3"
services:
caddy:
image: caddy:2.8-alpine
restart: unless-stopped
ports:
- "80:80"
volumes:
use num::BigInt;
fn main() {
let a = "-80538738812075974".parse::<BigInt>().unwrap();
let b = "80435758145817515".parse::<BigInt>().unwrap();
let c = "12602123297335631".parse::<BigInt>().unwrap();
let a3 = a.pow(3);
let b3 = b.pow(3);
let c3 = c.pow(3);
@darklinden
darklinden / main.rs
Created April 24, 2024 01:55
Is there a better algorithm for grouping projects by activity timeframe?
use std::collections::{HashMap, HashSet};
#[derive(Clone, Debug)]
struct Item {
start: i64,
end: i64,
id: i32,
}
impl Item {