Skip to content

Instantly share code, notes, and snippets.

View antoinevg's full-sized avatar
🦋

antoinevg

🦋
View GitHub Profile
@antoinevg
antoinevg / fasta.hs
Created March 21, 2011 10:04
Minimal Parsec parser for FASTA sequence data
import Text.ParserCombinators.Parsec
fasta :: Parser [[String]]
fasta = do a <- many record
eof
return a
record :: Parser [String]
record = do a <- header
b <- dna
@antoinevg
antoinevg / import_aar.py
Last active August 15, 2016 12:07
Import AAR libraries to a Trigger.io Native Module project
#!/usr/bin/env python
import contextlib
import errno
import json
import os
import shutil
import sys
import tempfile
import zipfile
@antoinevg
antoinevg / index.html
Last active August 29, 2015 14:23
Mozilla PDF.js viewer for Trigger.io
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- PDF.js -->
<link rel="stylesheet" href="bower_components/pdfjs-dist/web/pdf_viewer.css">
<script src="bower_components/pdfjs-dist/web/compatibility.js"></script>
<script src="bower_components/pdfjs-dist/build/pdf.js"></script>
@antoinevg
antoinevg / ableton.xtm
Created February 20, 2016 16:14
Simple MIDI Sync for Extempore and Ableton
;; useful
(define *beats-per-bar* (lambda () 4))
(define *next-bar* (lambda () (*metro* 'get-beat (*beats-per-bar*))))
;; init MIDI & create a stream for my Ableton IAC device
(sys:load "libs/external/portmidi.xtm")
(pm_initialize)
(pm_print_devices)
(define *ableton* (pm_create_output_stream 7))
@antoinevg
antoinevg / sineModelMulti.py
Created December 4, 2016 07:19
A multi-resolution sinusoidal model
import sys
import math
import numpy as np
eps = np.finfo(float).eps # epsilon, minimum float value in python
from scipy.fftpack import fft, ifft
from scipy.signal import triang, get_window, blackmanharris
sys.path.append("../../software/models/")

Adapted from:

https://github.com/MabezDev/xtensa-rust-quickstart

Like this:

# - deps ------------------------------------------------------------------

sudo port install ninja

@antoinevg
antoinevg / toolkit_uninstall.md
Created August 17, 2020 06:52
Uninstalling the Trigger Toolkit

Mac

  1. Delete the TriggerToolkit app from your Applications folder.
  2. Run: rm -rf ~/Library/Trigger\ Toolkit

Windows

  1. Run the uninstaller.
  2. Make sure the following directory has been deleted:
@antoinevg
antoinevg / toolkit.md
Last active February 17, 2021 06:39
Legacy instructions for Toolkit

Apple and Google's security decisions are having knock-on effects for locally hosted web apps that have made it impractical to continue supporting the toolkit:

  • Apple's Gatekeeper and Notarisation frameworks don't support Python apps
  • The war on cookies and other blanket applications of content restriction has destroyed our ability to reliably run a local webserver and serve the app to the browser.

That said, it may still be possible to get the Toolkit running with a bit of effort:

Activity Monitor

Keybase proof

I hereby claim:

  • I am antoinevg on github.
  • I am antoinevg (https://keybase.io/antoinevg) on keybase.
  • I have a public key ASAgPV7eWY0FD9HbDUZzyfuE0DLU__ejieTLbIOu1MmirQo

To claim this, I am signing this object:

@antoinevg
antoinevg / irdest-braü.md
Created January 19, 2022 15:33
Irdest Braü

Irdest Braü

Install Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"