Skip to content

Instantly share code, notes, and snippets.

View nethoncho's full-sized avatar
🍊

Net Honcho nethoncho

🍊
View GitHub Profile
@gamblor21
gamblor21 / drums.py
Created May 31, 2023 23:53
Drums for Circuitpython synthio
import ulab.numpy as np
import random
import synthio
SAMPLE_SIZE = 200
sinwave1 = np.array(np.sin(np.linspace(0, 2*np.pi, SAMPLE_SIZE, endpoint=False)) * 32767, dtype=np.int16)
sinwave2 = np.array(np.sin(np.linspace(np.pi/2, 2.5*np.pi, SAMPLE_SIZE, endpoint=False)) * 32767, dtype=np.int16)
downwave = np.linspace(32767, -32767, num=3, dtype=np.int16)
noisewave = np.array([random.randint(-32767, 32767) for i in range(SAMPLE_SIZE)], dtype=np.int16)
@todbot
todbot / synthio_midi_synth.py
Last active March 26, 2025 18:58
pretty usable MIDI-controlled synth using synthio in CircuitPython
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython
# 11 May 2023 - @todbot / Tod Kurt
# Uses cheapie PCM5102 DAC on QTPY RP2040
# Video demo: https://www.youtube.com/watch?v=N-PbbWWDE6k
# Features:
# - midi velocity controls attack rate (gentle press = slow, hard press = fast)
# - notes have small random detune on all oscillators to reduce phase stacking
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83)
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82)
# - vibrato depth on mod wheel (midi controller 1)
@ErisDS
ErisDS / README.md
Last active January 14, 2023 15:26
Deployment tools for Ghost themes

Gulp tools to deploy a Ghost theme

To set it up:

  • copy gulp-config.json.example to gulp-config.json
  • enter the blog admin url, no trailing slash, e.g. https://myblog.ghost.io
  • grab the client secret for the frontend from the source of any page of the blog
  • enter the email address & password you use to login to the blog (must be administrator-level)

To deploy:

@nethoncho
nethoncho / ! pg-migrate-demo
Last active October 25, 2017 03:27
Postgresql database migration management
# https://github.com/salsita/node-pg-migrate
npm install node-pg-migrate
@marshallswain
marshallswain / authentication.js
Last active September 24, 2021 08:59
Example tools for using querystring redirects with Feathers OAuth login.
'use strict';
const authentication = require('feathers-authentication');
const jwt = require('feathers-authentication-jwt');
const local = require('feathers-authentication-local');
const oauth2 = require('feathers-authentication-oauth2');
const GithubStrategy = require('passport-github');
// Bring in the oauth-handler
const makeHandler = require('./oauth-handler');
@deanrad
deanrad / ObservablesTop10.md
Last active April 21, 2020 20:21
Why Observables? Top 10 list

Why Should I Learn Observables (RxJS)?

  • They're > 10 years old and already on every platform (JS, Ruby, Python..)
  • They're like multi-valued Promises.
  • They're cancelable, and their compoositions remain cancelable.
  • Netflix is built on 'em, Microsoft originally built them—they're here to stay.
  • Angular and GraphQL are built around them, React integrates well
  • You can do normal collection operations on them (filter, map).
  • You can do async wizardry with them (bufferWithTimeOrCount).
  • Their schedulability means your test code can run in 'virtual time'.
@skive
skive / gist:a066b4712aed880f3245
Created March 11, 2016 18:00
Script to block MS telemetry using Mikrotik router
/ip firewall address-list add list=MStelemetry address=111.221.29.177
/ip firewall address-list add list=MStelemetry address=111.221.29.253
/ip firewall address-list add list=MStelemetry address=131.253.40.37
/ip firewall address-list add list=MStelemetry address=134.170.30.202
/ip firewall address-list add list=MStelemetry address=134.170.115.60
/ip firewall address-list add list=MStelemetry address=134.170.165.248
/ip firewall address-list add list=MStelemetry address=134.170.165.253
/ip firewall address-list add list=MStelemetry address=134.170.185.70
/ip firewall address-list add list=MStelemetry address=137.116.81.24
/ip firewall address-list add list=MStelemetry address=137.117.235.16
@evanjfraser
evanjfraser / README.md
Last active December 12, 2017 23:40 — forked from rkirsling/LICENSE
Trend Chart (Area + Line)

This "trend chart" shows loading times across releases of a hypothetical web application.

It is a mixture of a line chart and an area chart, with the daily median loading time indicated by the line and percentile ranges indicated by the surrounding areas.

The "lollipops" mark releases of (different parts of) the application.

anonymous
anonymous / microsoft-oauth_microsoft-oauth-tests.js
Created April 18, 2015 23:33
Meteor OAuth with Microsoft (eg Hotmail, Live.com etc)
// Write your tests here!
// Here is an example.
Tinytest.add('example', function (test) {
test.equal(true, true);
});
@hsiboy
hsiboy / Lightning.ino
Last active October 25, 2023 10:08
WS2811 - Lightning effect - FastLed
// stolen from https://github.com/fibonacci162
#include <FastLED.h>
#define LED_PIN 13 // hardware SPI pin SCK
#define NUM_LEDS 250
#define COLOR_ORDER RGB
#define LED_TYPE WS2811
#define MAX_BRIGHTNESS 255 // watch the power!
#define FPS 50