Skip to content

Instantly share code, notes, and snippets.

View mefellows's full-sized avatar

Matt Fellows mefellows

View GitHub Profile
@mefellows
mefellows / .gitignore
Last active July 29, 2023 00:26
AVJ All of repro
node_modules
@mefellows
mefellows / readme.md
Created July 22, 2022 05:49
MOV to GIF recordings
# Create a full colour palette from a source
ffmpeg -y -i <input> -vf fps=15,scale=1024:-1:flags=lanczos,palettegen palette.png

# Export a GIF from the source, using the palette
ffmpeg -y -i <input> -i palette.png -filter_complex "fps=15,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif

See other useful combinations here: https://gist.github.com/dergachev/4627207

@mefellows
mefellows / osx.txt
Last active January 12, 2022 00:57
Shared library debugging tips
# Print out demangled symbols referenced in a library
nm -C myaddon.node
# list libraries another lib depends on
otool -L /path/to/lib.dylib # OSX
ldd /path/to/lib.so # linux
# List rpath of a library
# https://stackoverflow.com/questions/12521802/print-rpath-of-an-executable-on-macos
# https://www.lekensteyn.nl/rpath.html#what-is-rpath
@mefellows
mefellows / gist:aa919375a2df819c59e7fd005fd62d56
Created December 6, 2021 03:13
Removing OSX code sign / untrusted binary
xattr -d com.apple.quarantine <path to file>
<?php
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// 20210310: Modifications
// - Adds anchors to timestamps for permalinks
/////////////////////
@mefellows
mefellows / release.sh
Created May 22, 2020 12:05
Automatic changelog and release tagging for semantic commits
#!/bin/bash
set -e
trap cleanup TERM
date=$(date "+%d %B %Y")
function step {
echo " -----> $1"
}
@mefellows
mefellows / README.md
Created February 26, 2017 00:55
Pact Node #27 Gist

Repro for Issue #27

npm i
node index.js

Should produce something like:

@mefellows
mefellows / foo.json
Created November 6, 2016 05:07
Pact output example (v2)
{
"consumer": {
"name": "MyConsumer"
},
"provider": {
"name": "MyProvider"
},
"interactions": [
{
"description": "Some name for the test",
@mefellows
mefellows / bootstrap.ps1
Created March 26, 2016 00:39
Bootstrap Vagrant and Rsync on Windows
Write-Host -ForegroundColor green "Bootstrapping machine"
Write-Host "Setting up package management and installing required packages for Dev."
#
# Install Choco (if not already installed) + required packages
#
if ( (Get-Command "choco" -errorAction SilentlyContinue) ) {
Write-Host "Chocolatey already installed. Skipping."
} else {