Skip to content

Instantly share code, notes, and snippets.

@djfdyuruiry
djfdyuruiry / README.md
Last active October 8, 2024 04:54
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

@jarmitage
jarmitage / avril.tidal
Created April 14, 2020 20:37
Avril 14th
-- happy avril 14th :)))))))))))))))))))))))))))))))))))))))
do
let bars = 4
key = "8"
righthand = "[[4 -3] [0 _ _ _ _ _ 0]] [[-3, -8] [7 5 4 0]]"
lefthand = "[0 9 12 16] [4 12 16 19] [5 12 17 19] [2 12 17 16]"
d1 $ slow bars
$ stack [
n (righthand + key + "<24 36>/2"),
@knandersen
knandersen / morphagene_ableton.py
Last active August 23, 2024 01:55 — forked from ferrihydrite/morphagene_audacity.py
Allows you to use Ableton projects and exports as reels for the Make Noise Morphagene eurorack module. Since a few people have found the script not working or difficulty getting python to work, I have created a web-based tool: https://knandersen.github.io/morphaweb/
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
USAGE:
morphagene_ableton.py -w <inputwavfile> -l <inputlabels> -o <outputfile>'
Instructions in Ableton:
Insert locators as splice markers in your project (Create > Add Locator)
Export Audio/Video with
Sample Rate: 48000 Hz
@akarve
akarve / right-estimator-cheat-sheet.txt
Last active April 4, 2018 08:09
Choosing the right machine learning algorithm
Adapted from [scikit learn cheat sheet](http://scikit-learn.org/stable/tutorial/machine_learning_map/index.html).
* More than 50 samples?
* No
* Get more data
* Yes
* Predicting a category?
* No
* Predicting a quantity?
* No
-- The meta-circular interpreter from section 5 of Reynolds's Definitional
-- Interpreters for Higher Order Programming Languages
-- (http://www.cs.uml.edu/~giam/91.531/Textbooks/definterp.pdf)
data EXP
= CONST Const
| VAR Var
| APPL Appl
| LAMBDA Lambda
| COND Cond

How to get firmware onto mutable modules

I had the best luck with the Black Magic Probe and gdb.

Install compiler

First install the arm compiler:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
@jkmaxwell
jkmaxwell / arpeggios.md
Last active March 8, 2017 19:26
Floating & Arpeggios
  • Ashra, "New Age of Earth" — @stringbot
  • Kyle Landstra - @stringbot
  • Pulse Emitter - @stringbot
  • Donnacha Costello, "Love from Dust" - @johntejada
  • Stephen Falken, "Phantom Tracks vol 1" - @2xlp
  • Manuel Gottsching (Ashra), "Inventions for Electric Guitar" - @2xlp
  • Jo Johnson, "Weaving" - @stringbot
  • David Borden, "Music for Amplified Keyboard Instruments" - @basskitten
  • Michael Hoenig, "Departure from the northern wasteland" - @basskitten
  • Jürgen Müller, "Science Of The Sea" - @_ricardodonoso
@parente
parente / spark-csv.ipynb
Created January 5, 2016 04:24
Use spark-csv from Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulp
paulp / universal.scala
Created May 6, 2015 16:21
existentials are inverted universals
// [info] Running p.Run
// List(Fish(Bob, Esq.,12), Kitty(Thor, Esq.,java.awt.Color[r=255,g=200,b=0]))
import java.awt.Color
package p {
trait Pet[A] {
def name(a: A): String
def renamed(a: A, newName: String): A
}
@masak
masak / explanation.md
Last active October 2, 2024 09:32
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.