Skip to content

Instantly share code, notes, and snippets.

@coreequip
coreequip / !README.md
Last active February 8, 2022 12:37
FS-Launch - a FirstSprit™ launcher

FS-Launch - a FirstSprit™ launcher

FS-Launch is a powershell script to login, download and run a FirstSpirit config file.

Installing

Just copy the script in a folder of your choice.

Setup

@coreequip
coreequip / !Generate-HTML.md
Created September 20, 2022 12:57
Generate HTML rollup.js plugin

Generate HTML Rollup.js Plugin

Usage

generateHtml(templatePath, outputFilename, contect, doCompress

Example:

// rollup.config.js plugin part
@coreequip
coreequip / !DimmTrigger.md
Last active October 31, 2024 12:46
DimmTrigger™

DimmTrigger™

A little daemon that detect screen sleep and wakeup and triggers shell script(s) to run an action. Here to toggle the power state of a connected Android TV.

0. Prerquisites

Get ADB for MacOS: brew install android-platform-tools

@coreequip
coreequip / Energy-Hamburg.js
Last active June 12, 2024 13:33
Google Apps Script - Energy Hamburg - Last 14 days playlist
const CACHE_TOKEN = 'NRJ14D_TOKEN'
const SPOTIFY_CLIENT_ID = PropertiesService.getScriptProperties().getProperty('CLIENT_ID')
const SPOTIFY_CLIENT_SECRET = PropertiesService.getScriptProperties().getProperty('CLIENT_SECRET')
const REFRESH_TOKEN = PropertiesService.getScriptProperties().getProperty('REFRESH_TOKEN')
const PLAYLIST_ID = PropertiesService.getScriptProperties().getProperty('PLAYLIST_ID')
const ENERGY_HAMBURG_API_URL = 'https://api.nrjnet.de/webradio/playlist/energy/hamburg?day=0&hour=-1';
// fetch a new Spotify access token
function getSpotifyAccessToken() {
let token = CacheService.getScriptCache().get(CACHE_TOKEN);
@coreequip
coreequip / !MicSwitchDetect.md
Last active February 27, 2025 14:04
MicSwitchDetect™ - A little daemon that detect audio input source change and sets the input source back to the users choice.

MicSwitchDetect™

A little daemon that detect audio input source change and sets the input source back to the users choice.

1. Compile mic-switch-detect.swift

swiftc mic-switch-detect.swift