Skip to content

Instantly share code, notes, and snippets.

View stoph's full-sized avatar
🏎️

Christoph Khouri stoph

🏎️
View GitHub Profile
@stoph
stoph / notify
Created November 21, 2014 19:13
Add osx notifications to CLI scripts
#!/bin/sh
# Save this as /usr/local/bin/notify
# chmod +x /usr/local/bin/notify
#
# Usage:
# sleep 2;notify "I'm awake" Sleepy
if [ "$1" ]
then
@philipstanislaus
philipstanislaus / gist:c7de1f43b52531001412
Last active June 20, 2024 16:32
JavaScript: Save a blob to disc
var saveBlob = (function () {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
return function (blob, fileName) {
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.click();
window.URL.revokeObjectURL(url);
@samguyer
samguyer / fastledtask.cpp
Created May 31, 2018 02:40
Code to run FastLED on separate core
// ===== FastLED Show task ========================================
// -- The core to run FastLED.show()
#define FASTLED_SHOW_CORE 0
bool gShowOnOtherCore = true;
// -- Task handles for use in the notifications
static TaskHandle_t FastLEDshowTaskHandle = 0;
static TaskHandle_t userTaskHandle = 0;