Skip to content

Instantly share code, notes, and snippets.

View KoltesDigital's full-sized avatar

Jonathan Giroux (Koltes) KoltesDigital

View GitHub Profile
get_github_release_url() {
repo=$1
name_match=$2
if ! curl -L -s https://api.github.com/repos/$1/releases/latest | jq -re "first(.assets[] | select(.name | match(\"$name_match\"))).browser_download_url" ; then
echo "No assets matching '$2' at 'https://github.com/$1/releases/latest/'."
return 1
fi
}
@KoltesDigital
KoltesDigital / midiToOsc.scd
Created March 24, 2019 13:07
MIDI to OSC in SuperCollider
(
var on, off, cc;
var osc;
osc = NetAddr.new("127.0.0.1", 6010);
MIDIClient.init;
MIDIIn.connectAll;
on = MIDIFunc.noteOn({ |val, num, chan, src|
@KoltesDigital
KoltesDigital / .gitconfig
Last active December 29, 2020 17:14
Git config
[alias]
a = add
aa = add --all
ap = add -p
al = !git config -l | grep alias | cut -c 7-
b = branch
bd = branch -D
bl = !git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'
bm = branch -m
bp = !git branch --merged master --no-color | grep -v ' master$' | xargs -n1 -r git branch -d
@KoltesDigital
KoltesDigital / index.html
Last active August 14, 2018 21:58 — forked from MAKIO135/index.html
Using canvas as ThreeJS texture
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body style="background:#fff;">
<script src="http://cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js"></script>
<script id="jsbin-javascript">
var width = window.innerWidth, height = window.innerHeight / 2;
@KoltesDigital
KoltesDigital / CLA for MIT license.md
Last active August 9, 2017 13:09 — forked from pjcozzi/CLA.md
CLA for MIT license

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the MIT license; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the MIT license; or

@KoltesDigital
KoltesDigital / config.js
Created June 13, 2017 14:00
JSPM workaround for "Bootstrap's JavaScript requires jQuery"
System.config({
...
meta: {
"github:twbs/bootstrap@4.0.0-alpha.6/js/bootstrap": {
"globals": {
"jQuery": "jquery",
"$": "jquery"
}
}
},
@KoltesDigital
KoltesDigital / redis-gitlab
Created December 29, 2014 22:18
Init.d script for Redis (example with GitLab configuration). Retrieves the pid file and the port/socket connection from the configuration file. Sends SHUTDOWN to stop the server. Tested on Debian Wheezy.
#! /bin/bash
### BEGIN INIT INFO
# Provides: redis-gitlab
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db