Skip to content

Instantly share code, notes, and snippets.

# Create mount points for decrypted sparse bundle disk image and full Apple disk image.
sudo mkdir /mnt/bundle /mnt/dmg
# Ensure loopback kernel module is loaded.
lsmod | grep ^loop || sudo modprobe loop
# Decrypt and FUSE-mount sparse bundle disk image. Trailing options help with debugging.
sudo sparsebundlefs <ENCRYPTED_SPARSE_BUNDLE_DISK_IMAGE> /mnt/bundle -s -f -D
# Note partition 2's "Start" and "Size" values.
#!/bin/sh
# START CONFIG
USER_AGENT=''
CLIENT_ID=''
CLIENT_SECRET=''
USERNAME=''
PASSWORD=''
# END CONFIG
@thislooksfun
thislooksfun / .gitconfig
Created March 16, 2021 16:34
My Git Aliases
[alias]
aliases = "!echo \"Use 'git la' to list aliases\""
a = add
aa = "!git add -A && git st"
b = branch
bd = branch -d
bl = branch --list
co = checkout
cod = checkout develop
/* ==UserStyle==
@name Salamanstra
@author Cascadea User
@version 1.0
@namespace cascadea188508083
@preprocessor default
==/UserStyle== */
@-moz-document domain("salamanstra.keenspot.com")
{

Tips for C

  1. To stop vscode complaining about struct sigaction, add #define _GNU_SOURCE.
# ------------------------------------------------
# Generic C Makefile
#
# Adapted from https://stackoverflow.com/questions/7004702
# ------------------------------------------------
##### START CONFIG #####
### START BASIC CONFIG ###
#!/usr/bin/env node
const DEFAULT_KEY = "out";
function setOutput(name, val) {
console.log(`::set-output name=${name}::${val}`);
}
function parseAndOutput(data) {
try {
@thislooksfun
thislooksfun / mod_migrator.sh
Last active May 1, 2017 05:39
A simple mod migration script for Factorio 0.14 -> 0.15
#!/bin/bash
VERSION="1.1.1"
# ██ ██ ███████ ██████ ██ ███████ ██ ██ █████ ██████ ██████ ███████
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██ ██ █████ ██████ ██ █████ ████ ███████ ██████ ██ ███ ███████
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ████ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ ███████
@thislooksfun
thislooksfun / gquit
Created February 21, 2017 01:54
Small Bash script to gently quit applications from the command line
#!/bin/bash
if [ $# -eq 1 ]; then
echo "Quitting '$1'"
osascript -e "quit app \"$1\""
else
echo -e " Usage:\n gquit [Application Name]"
fi
@thislooksfun
thislooksfun / .bash_profile
Last active May 9, 2017 18:09
My personal .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management