Skip to content

Instantly share code, notes, and snippets.

Pedro Figueiredo pfig

Block or report user

Report or block pfig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pfig / BootTidal.hs
Last active Sep 4, 2019
Tidal startup errors in emacs
View BootTidal.hs
-- $ ghc-pkg describe $(ghc-pkg latest tidal) | grep data-dir | cut -f2 -d ' '
-- /Users/pfig/.cabal/share/x86_64-osx-ghc-8.6.5/tidal-1.4.3
-- $ cat /Users/pfig/.cabal/share/x86_64-osx-ghc-8.6.5/tidal-1.4.3/BootTidal.hs
:set -XOverloadedStrings
:set prompt ""
:set prompt-cont ""
import Sound.Tidal.Context
View gist:e7ccc7ca9832748dccf91d67c03c4cff
GHCi, version 8.2.1: :? for help
<interactive>:3:18: error:
Variable not in scope: bpsUtils :: IO (a0, b0)
<interactive>:4:12: error:
Variable not in scope: superDirtSetters :: t0 -> IO (a0, b0)
<interactive>:4:29: error: Variable not in scope: getNow
pfig /
Last active Apr 19, 2017
HTTP server producing a stream of RecordIO data
# Run with gunicorn -k eventlet server:app
# Dependencies:
# eventlet==0.21.0
# Flask==0.12.1
# gunicorn==19.7.1
import time
import random
pfig /
Created Dec 20, 2016 — forked from TomWhitwell/
Python script to generate random scores for modular synth
import random
import string
# -*- coding: utf-8 -*-
def randomname(length = 6):
vowels = ['a','e','i','o','u','']
consonants = ['b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z']
a = random.sample(consonants,length/2)
x = 1
pfig / rain.scd
Created Oct 10, 2016
A crude driver for my attempts at phase music
View rain.scd
b =, thisProcess.nowExecutingPath.dirname +/+ "press_the_red_again.wav");
k =, thisProcess.nowExecutingPath.dirname +/+ "kissy_face.wav");
m =, thisProcess.nowExecutingPath.dirname +/+ "notice_me_senpai_short.aiff");
// Create a Synth capable of all the transforms we want
SynthDef(\reich, {

From Tim Peters's Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
pfig / be.pfig.notebooks.plist
Created Sep 17, 2015
iPython notebooks managed by launchctl
View be.pfig.notebooks.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
pfig / gist:0508a1c735e1b0bf6219
Created Apr 5, 2015
5-star album reviews from The Guardian
View gist:0508a1c735e1b0bf6219
# cf
curl -s $URL | jq \
'[.response.results[] | select((.fields.starRating | tonumber) == 5) | {webTitle, webUrl}]'

Keybase proof

I hereby claim:

  • I am pfig on github.
  • I am pfig ( on keybase.
  • I have a public key whose fingerprint is 4A46 D391 411F EB63 1797 119B 66A4 7DA9 0F9F C14A

To claim this, I am signing this object:

View Solarized (Dark).tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Solarized (dark)</string>
You can’t perform that action at this time.