Skip to content

Instantly share code, notes, and snippets.

@idleberg
idleberg / rle_dec.lua
Last active Apr 6, 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
end
return out
end
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
idleberg / scoop.md
Last active Feb 11, 2021
Scoop Aliases
View scoop.md

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 / 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 "https://github.com/AlbanBedel/scummc#readme"
url "https://github.com/AlbanBedel/scummc/archive/v0.2.1.tar.gz"
sha256 "1d9b412d7ab6197495589a19a4745f58b35a002e26cea21bf6874a7ae4f1fd2e"
depends_on "bison" => :build
depends_on "freetype" => :build
depends_on "gtk+" => :build
depends_on "readline" => :build
@idleberg
idleberg / avsex.md
Last active May 19, 2018
avs expressions
View avsex.md

Bump

x, y, isBeat, isLBeat, bi

Color Modifier

red, green, blue

Dynamic Distance Modifier

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

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 compile.sh 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.

@idleberg
idleberg / pynsist.sublime-build
Created Jul 22, 2017
Pynsist build file for Sublime Text
View pynsist.sublime-build
{
"selector": "source.ini",
"cmd": ["pynsist", "$file"],
"variants": [
{ "name": "No MakeNSIS",
"cmd": ["pynsist", "--no-makensis", "$file"]
}
]
}