Skip to content

Instantly share code, notes, and snippets.

@rbmntjs
rbmntjs / printMarkFeature.py
Last active July 1, 2018 16:46
A simple Python script that loops through your font, looks for anchors, and spits out a mark feature.
'''
Print all requested anchors as a mark feature
Requires Robofont, Robofab and the Adobe FDK
'''
# TODO: Include mkmk?
####################################################
### Edit the next settings to match your font setup.
####################################################
@justvanrossum
justvanrossum / SquareVsLozenge.py
Created May 3, 2016 19:07
DrawBot: Create a simple animation with a grid of rotating squares.
# http://dailydrawbot.tumblr.com/post/143801148619/square-vs-lozenge
def rotatedSquare(x, y, squareSize, angle):
offsetSin = squareSize * sin(radians(angle))
save()
translate(x + offsetSin, 0)
rotate(angle)
rect(0, 0, squareSize, squareSize)
restore()
@tcg
tcg / README.md
Created June 9, 2017 16:25
Raspberry Pi Zero W as Internet connected Access Point *and* Wireless Client

I wanted this capability for various reasons. It's not necessarily stable, because uap0 has to use the same channel as wlan0, and if you're traveling/mobile, wifi channels aren't necessarily predictable.

This is not a guide. This is just so I remember how to get back where I started, in case I wipe this thing. =)

Extremely helpful guides that got me here:

@ysr23
ysr23 / pi zero W ap setup.md
Last active April 8, 2024 23:42
Raspberry Pi Zero W Access Point (ap) setup

These are my own personal notes on how i setup a Pi Zero W as an access points it is a blatant copy of this: https://gist.github.com/tcg/0c1d32770fcf6a0acf448b7358c5d059 but is just missing a couple of things from: http://imti.co/post/145442415333/raspberry-pi-3-wifi-station-ap and like tcg, this is not intended as a guide but notes as i will invariably have to rebuild this sometime and i have broken biscuits for brains.

1. making the pi zero accesible from a computer

this is really just the same info as here https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a

  • flash raspbian lite to sd card
  • unplug and replug sd card adapter if necessary to see 'boot' drive
  • edit cmdline.txt add: modules-load=dwc2,g_ether after the word rootwait
  • edit config.txt and add dtoverlay=dwc2 to the end of the file
  • create a blank file called ssh
"""
Flatten a font's GPOS kerning.
"""
from fontTools.ttLib import TTFont
def _kerning_lookup_indexes(ttfont):
"""Return the lookup ids for the kern feature"""
for feat in ttfont['GPOS'].table.FeatureList.FeatureRecord:
if feat.FeatureTag == 'kern':
@frankrolf
frankrolf / drawbot_interpolate_glyph_gif.py
Created June 3, 2018 23:16
DrawBot script to create joyful GIF animations of interpolated glyphs
'''
Type@Cooper West, June 2018
Contribution to Andy Clymer's "Expanding a Type Family" workshop
Script to create joyful GIF animations of interpolated glyphs,
either colorful or black & white.
'''
from fontTools.pens.cocoaPen import CocoaPen
@millxing
millxing / quence01.lua
Last active February 8, 2020 18:49
This is the latest version (as of 11/4/2018) of QUENCE, a probabilistic MIDI sequencer for norns and grid (monome.org)
-- Q * U * E * N * C * E
--
-- a probababilistic
-- 4-track MIDI sequencer
-- for norns and grid
--
-- Rob Schoen
-- millxing at gmail
-- inspired by Turing Machine, Fugue Machine, and Physical (Norns Study #4)
-- LA Drivers
-- thanks to mark
--enc 1: move key center by 5th
--enc 2: move key center by 4th
--key 2: walk through current scale
--enc 3: add random/remove last
--key 2: parallel modulation
--key 3: random scale
MusicUtil = require "mark_eats/musicutil"
@millxing
millxing / ISOKB.lua
Last active December 12, 2022 21:16
ISOKB is a 2-channel MIDI keyboard for Norns and Grid. It uses an isomorphic "in key" note layout similar to Ableton Push.
-- ISOKB
--
-- 2-channel MIDI keyboard for Norns and Grid
-- Isomorphic "in key" note layout (similar to Ableton Push)
-- Select a tonic note and one of nine 7-note scales (default C Major)
-- Two independent keyboards, each sends MIDI to a different MIDI channel
-- Left hand notes go to MIDI 1
-- Right hand notes go to MIDI 2
-- There will be multiple buttons for each note and all buttons corresponding to a pressed note will light up
--
@alpha-cactus
alpha-cactus / meadowphysics_lib.lua
Last active January 5, 2019 21:53
meadowphysics norns
local mp = {}
mp.__index = mp
mp.MODE_POSITION = 0
mp.MODE_SPEED = 1
mp.MODE_RULES = 2
local mp_set = {}
mp_set.__index = mp_set