Skip to content

Instantly share code, notes, and snippets.

View danielmkarlsson's full-sized avatar

Daniel M Karlsson danielmkarlsson

View GitHub Profile
#include <stdio.h>
#include <stdint.h>
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo
{
while(len--)
{
crc ^= *buffer++ << 8;
int bits = 0;
do
@caseyanderson
caseyanderson / keyTrigRec.scd
Last active February 3, 2023 21:48
keyDownAction triggers a Phasor until a keyUpAction, can be used to store and share the duration of a recording into a buffer. Note: repeat triggers from keyDownAction are blocked
s.options.inDevice_("MacBook Pro Microphone");
s.options.outDevice_("MacBook Pro Speakers");
s.boot;
~buf = Buffer.alloc( s, s.sampleRate * 60, 1);
~dur = Bus.control(s, 1);
(
SynthDef(\record, {|amp = 0.9, buf, rate = 1, recManualBus, off = 0, trig = 0|
@bgold-cosmos
bgold-cosmos / install-tidal.pl
Last active September 7, 2018 07:17
Tidal install script for MacOS
#!/usr/bin/perl -w
# --------------------------------------------
# install-tidal.pl
# created by Ben Gold at 09:35 Sat Oct 28 2017
# --------------------------------------------
use strict;
my($url,$exists);
my(%pageURL) = (
@doctorpangloss
doctorpangloss / libtorrent and rtorrent on mac.sh
Last active February 8, 2021 13:22
Compiling rtorrent on a mac
#!/bin/bash
# Installs the XCode command line tools if you don't have them
xcode-select --install
# Installs brew if you don't have it
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Makes your account the owner of /usr/local, which is preferred on single user Macs
sudo chown -R `whoami` /usr/local
# Installs all the dependencies for building libtorrent and rtorrent
brew install automake libtool boost curl lzlib libsigc++ openssl
# Uninstall libtorrent-rasterbar if you already have it
@mikermcneil
mikermcneil / disabling-macosx-notification-center.md
Last active December 24, 2025 08:28
Disable/Enable Notification Center (MacOS X)

Toggle MacOS X Notification Center on or off

This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.

Set Up Bash Aliases

Installation

  1. Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press <↩ (enter)>).