Skip to content

Instantly share code, notes, and snippets.

View idleberg's full-sized avatar

Jan T. Sott idleberg

View GitHub Profile
@idleberg
idleberg / Restore Mac using DFU mode.md
Last active May 13, 2025 17:26
Restore Mac using DFU mode

Note

If you followed this guide before, you might want to scroll all the way down to the TL;DR version of this guide

Intro

Somehow, I managed to ”brick“ my Mac mini (2018, Intel) when I wiped its data before selling it online. From then on I could no longer:

  • boot the normal Recovery Mode
  • re-install macOS using an USB stick
  • use the online Recovery Mode, since it always ended up in a error -1008F
@idleberg
idleberg / vscode-macos-context-menu.md
Last active May 2, 2025 05:16
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@idleberg
idleberg / sublime-text-macos-context-menu.md
Last active April 28, 2025 22:55 — forked from vincentmac/sublime-text-osx-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments
@idleberg
idleberg / MastodonIFTTT.md
Last active March 28, 2025 08:28
Connecting IFTTT with Mastodon

Important

IFTTT now has official support for Mastodon, so following this guide is no longer necessary!

Connecting IFTTT with Mastodon

As of the time of this writing, IFTTT has no integration for Mastodon. Yet, it's possible to connect the two.

Mastodon

  1. Login to your Mastodon account
@idleberg
idleberg / fish_shell.md
Last active February 25, 2025 01:21
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. Also includes several useful functions.

Installation

  1. Install fish via Brew
  2. Optionally install Oh My Fish!
  3. Add fish to known shells
  4. Set default shell to fish
brew install fish  
curl -L https://get.oh-my.fish | fish
@idleberg
idleberg / scoop.md
Last active February 15, 2025 11:01
Scoop Aliases

Common aliases for the scoop package manager

# Install app
scoop alias add i 'scoop install $args[0]' 'Install app'
scoop alias add add 'scoop install $args[0]' 'Install app'

# Uninstall app
scoop alias add rm 'scoop uninstall $args[0]' 'Uninstall an app'
scoop alias add remove 'scoop uninstall $args[0]' 'Uninstall an app'
@idleberg
idleberg / playdate-sdk.md
Last active November 23, 2024 21:06
Install Playdate SDK using a package manager

Install Playdate SDK

If you're like me, you want to install the Playdate SDK using a package manager. Below are some options for you.

Info Did I miss anything? Please comment below!

macOS

@idleberg
idleberg / shell.nix
Last active October 25, 2024 12:13
My Nix Shell configuration for NodeJS development
{
pkgs ? import <nixpkgs> {
config = {
allowUnfree = true;
};
},
}:
pkgs.mkShell {
packages = with pkgs; [
@idleberg
idleberg / Install-Mcrypt.md
Last active September 2, 2024 06:59
Install Mcrypt on macOS

Setup php-mcrypt on macOS (and versions of Mac OS X)

These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.

Install

Install Mcrypt using Homebrew and PECL (comes with PHP)

# PHP 7.3
@idleberg
idleberg / my-git-aliases.md
Last active June 8, 2024 15:55
my-git-aliases.md

The Git documentation lists some fairly common aliases:

git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status

Here are some of my personal ones: