Skip to content

Instantly share code, notes, and snippets.

View TheAngryByrd's full-sized avatar
🐦
😠 🐦

Jimmy Byrd TheAngryByrd

🐦
😠 🐦
View GitHub Profile
@darrenpmeyer
darrenpmeyer / open-vm-tools-vmware-ubuntu-sharing.md
Last active July 4, 2025 23:21
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(NB: adapted from this Ask Ubuntu thread -- tested to work on Ubuntu 16.04 LTS through Ubuntu 22.04 LTS (Jammy).

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@baronfel
baronfel / fsharpi
Created April 8, 2018 19:42
modified fsharpi that handles piped inputs nicer (Thanks John Wostenberg!)
#!/bin/sh
EXEC="exec "
FSHARPI_OPTIONS=""
if test x"$1" = x--debug; then
DEBUG=--debug
shift
fi
if test x"$1" = x--gdb; then
@brendankowitz
brendankowitz / CancellableSemaphore.cs
Last active January 24, 2024 11:24
What is a good pattern for Awaiting Semaphores with a CancellationToken?
/// <summary>
/// Allows a semaphore to release with the IDisposable pattern
/// </summary>
/// <remarks>
/// Solves an issue where using the pattern:
/// <code>
/// try { await sem.WaitAsync(cancellationToken); }
/// finally { sem.Release(); }
/// </code>
/// Can result in SemaphoreFullException if the token is cancelled and the
@baronfel
baronfel / fake
Created May 21, 2018 18:28
FAKE 5 netcore zsh completions
#source this from your .zshrc somehow
_fake() {
local cur
cur="${COMP_WORDS[COMP_CWORD]}"
RESULTS=$(fake -s build --list 2>/dev/null | tail -n +2 | awk '{$1=$1};1')
COMPREPLY=($(compgen -W "$RESULTS" -- "$cur"))
}
complete -F _fake fake
compdef fake
@attilah
attilah / X.Y.Z.Sources.csproj
Last active April 8, 2025 20:22
X.Y.Z.Sources nuget package
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<IsPackable>true</IsPackable>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
@eulerfx
eulerfx / Async.WithCancellation.fs
Created June 21, 2018 20:45
F# Async Cancellation Helper
let withCancellation (ct:CancellationToken) (a:Async<'a>) : Async<'a> = async {
let! ct2 = Async.CancellationToken
use cts = CancellationTokenSource.CreateLinkedTokenSource (ct, ct2)
let tcs = new TaskCompletionSource<'a>()
use _reg = cts.Token.Register (fun () -> tcs.TrySetCanceled() |> ignore)
let a = async {
try
let! a = a
tcs.TrySetResult a |> ignore
with ex ->
@kspeakman
kspeakman / Async.fs
Created June 28, 2018 23:42
Helpers
namespace Utils
module Async =
let retn x =
async { return x }
let lift f =
f >> retn
@jchannon
jchannon / instructions.md
Last active March 31, 2021 18:13
Install .NET Core Side By Side on Linux

dotnet-install

Add the below alias to be used in your terminal

alias dni='curl https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.sh -o ~/.dotnet/dotnet-install.sh -s | chmod +x ~/.dotnet/dotnet-install.sh | ~/.dotnet/dotnet-install.sh'

Execute the below command to see possible options

dni --help

@gusty
gusty / curry.fsx
Created July 9, 2019 22:13
Polyvariadic curry / uncurry
#nowarn "0042"
let inline retype (x: 'T) : 'U = (# "" x: 'U #)
open System
type Curry =
static member inline Invoke f =
let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Curry: _*_ -> _) b, a)
call_2 (Unchecked.defaultof<Curry>, Unchecked.defaultof<'t>) (f: 't -> 'r) : 'args
@Neo23x0
Neo23x0 / Base64_CheatSheet.md
Last active August 27, 2025 04:12
Learning Aid - Top Base64 Encodings Table

Base64 Patterns - Learning Aid

Base64 Code Mnemonic Aid Decoded* Description
JAB 🗣 Jabber $. Variable declaration (UTF-16), e.g. JABlAG4AdgA for $env:
TVq 📺 Television MZ MZ header
SUVY 🚙 SUV IEX PowerShell Invoke Expression
SQBFAF 🐣 Squab favorite I.E. PowerShell Invoke Expression (UTF-16)
SQBuAH 🐣 Squab uahhh I.n. PowerShell Invoke string (UTF-16) e.g. Invoke-Mimikatz
PAA 💪 "Pah!" &lt;. Often used by Emotet (UTF-16)