Skip to content

Instantly share code, notes, and snippets.

Andrew Kennedy L1fescape

View GitHub Profile
View gist:67f5a62536d1f4540395ddf4be0e7e33
### Keybase proof
I hereby claim:
* I am l1fescape on github.
* I am l1fescape (https://keybase.io/l1fescape) on keybase.
* I have a public key ASBcSW3XOiau_sUzyiUc3KQmnena3Z753ZqU9sj7EqxYzwo
To claim this, I am signing this object:
View README.md

Spotify Token

Generate authentication tokens for your Spotify application via node

Usage

$ SPOTIFY_CLIENT_ID=<clientID> npm start

Configure the Spotify Application

View keybindings.json
[
{ "key": "cmd+h", "when": "editorFocus", "command": "workbench.action.previousEditor" },
{ "key": "cmd+l", "when": "editorFocus", "command": "workbench.action.nextEditor" },
{ "key": "cmd+shift+h", "command": "workbench.action.terminal.focusPrevious" },
{ "key": "cmd+shift+l", "command": "workbench.action.terminal.focusNext" },
]
View parse-query.ts
// use query-string package?
type QueryMap = {[key: string]: string};
const parseQuery = (queryString: string, param: string): string => {
if (queryString.charAt(0) === '?') {
queryString = queryString.substr(1);
}
const parts = queryString.split('&');
const partsMap = parts.reduce((acc, part) => {
const splitIndex = part.indexOf('=');
if (splitIndex === -1) {
@L1fescape
L1fescape / README.md
Created May 13, 2018
and it still ain't a goddamn thing they could tell me
View README.md

Glowed Up

Control LED pixels via Arduino in node

Installation

Downlaod and install the arduino library

$ npm i -g nodebots-interchange
$ interchange install git+https://github.com/ajfisher/node-pixel -a uno --firmata
$ wget https://raw.githubusercontent.com/firmata/arduino/master/examples/StandardFirmataPlus/StandardFirmataPlus.ino
View FPSController.cs
using System;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;
using UnityStandardAssets.Utility;
using UnityStandardAssets.Characters.FirstPerson;
using Random = UnityEngine.Random;
namespace Taraval.Characters.FirstPerson
{
[RequireComponent(typeof (CharacterController))]
@L1fescape
L1fescape / server.js
Created Sep 4, 2017
`yarn add --dev express`
View server.js
var path = require('path');
var express = require('express');
var app = express();
var PORT = process.env.PORT || 3000;
var distRoot = './dist'
app.use(express.static(distRoot));
app.get('*', function(req, res) {
@L1fescape
L1fescape / post.md
Created Aug 15, 2017 — forked from chrisguttandin/post.md
What else can we do with the Web Audio API?
View post.md

What else can we do with the Web Audio API?

Of course the Web Audio API is meant for synthesizing and processing audio data. It is tailored for that use case. But at least in our digital world audio data is just a series of numbers, which are typically somewhere between +1 and -1. So why can't we use the Web Audio API for general computations?

Almost a year ago I had the pleasure to give a talk at the Web Audio Conference in Atlanta. The conference featured a lot of great talks, which I really appreciated as an attendee. However, as a speaker it was tough to reduce my own talk until it was short enough to fit into the schedule. I had the feeling that I had to rush through my slides. Since then I planned to write down my findings in a more detailed way, but I never got around to it. Luckily I was asked to repeat my talk at our local Web Audio Meetup here in

View rpi-header-pins.py
import RPi.GPIO as GPIO
import time
ledPin = 18
GPIO.setmode(GPIO.BCM)
GPIO.setup(ledPin, GPIO.OUT)
GPIO.output(ledPin, GPIO.LOW)
try:
You can’t perform that action at this time.