Skip to content

Instantly share code, notes, and snippets.

idleberg /
Last active Jul 7, 2021
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • 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 the following
    for f in "$@"; do
      open -a 'Visual Studio Code' "$@"
idleberg / rle_dec.lua
Last active May 27, 2021
Pico-8 RLE Decoder
View rle_dec.lua
-- Helper function to repeat string
function rep(char, multiplier)
local out = ""
for i=1, multiplier do
out = out..char
return out
View vscode-theme-colors.jsonc
"colors": {
// An extra border around active elements to separate them from others for greater contrast.
"contrastActiveBorder": "",
// An extra border around elements to separate them from others for greater contrast.
"contrastBorder": "",
//Overall border color for focused elements. This color is only used if not overridden by a component.
"focusBorder": "",
//Overall foreground color. This color is only used if not overridden by a component.
idleberg /
Last active Jul 16, 2021
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 / scummc.rb
Last active Sep 7, 2018
Brew formula for ScummC
View scummc.rb
class Scummc < Formula
desc "Set of tools allowing to create SCUMM games"
homepage ""
url ""
sha256 "1d9b412d7ab6197495589a19a4745f58b35a002e26cea21bf6874a7ae4f1fd2e"
depends_on "bison" => :build
depends_on "freetype" => :build
depends_on "gtk+" => :build
depends_on "readline" => :build
idleberg /
Last active May 19, 2018
avs expressions


x, y, isBeat, isLBeat, bi

Color Modifier

red, green, blue

Dynamic Distance Modifier

idleberg / in_arrayi.php
Created Jan 23, 2018 — forked from sepehr/in_arrayi.php
PHP: Case-insensitive in_array()
View in_arrayi.php
* Case-insensitive in_array() wrapper.
* @param mixed $needle Value to seek.
* @param array $haystack Array to seek in.
* @return bool
idleberg /
Created Nov 14, 2017
Build ScummC on macOS
# Pre-requisites
brew install bison
brew link bison --force
# Clone ScummC
git clone
cd scummc
# Build
idleberg /
Created Sep 11, 2017
Spawn Gulp in sub-folder relative to Git root
GIT_ROOT="$(git rev-parse --show-toplevel)"
printf "Spawning gulp in \"$DIRECTORY\"\n\n"
gulp --cwd "$DIRECTORY" $@
idleberg /
Created Aug 20, 2017 — forked from domenic/
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.