Skip to content

Instantly share code, notes, and snippets.

View emlyn's full-sized avatar

Emlyn Corrin emlyn

View GitHub Profile
@emlyn
emlyn / code.py
Last active April 16, 2021 22:14
Bad breaking names
# Requires: pip install unidecode
import gzip
import re
import unidecode
# From https://sciencenotes.org/list-elements-atomic-number/, contains:
# - Atomic number
# - Symbol
# - Name
@emlyn
emlyn / microtones.rb
Created September 23, 2021 15:35
Microtonal experiment with Sonic Pi
use_bpm 100
root = 220
chords = [[1/1.0, 5/4.0, 3/2.0],
[3/2.0, 15/8.0, 9/4.0],
[9/8.0, 45/32.0, 27/16.0],
[9/8.0, 3/2.0, 9/5.0],
[3/2.0, 2/1.0, 24/10.0],
[1/1.0, 5/4.0, 3/2.0]]
@emlyn
emlyn / dbws.js
Last active August 10, 2022 13:19
Tampermonkey: Display workspace name at top of Databricks page
// ==UserScript==
// @name Databricks Workspace
// @description Display workspace name at top of Databricks page
// @downloadURL https://gist.github.com/emlyn/169af82a09c2af8d79494f8d7e7d90b1/raw/dbws.js
// @updateURL https://gist.github.com/emlyn/169af82a09c2af8d79494f8d7e7d90b1/raw/dbws.js
// @namespace https://gist.github.com/emlyn
// @version 0.4
// @author Emlyn Corrin
// @match https://*.azuredatabricks.net/*
// @icon https://databricks.com/favicon.ico
@emlyn
emlyn / ms_ssi.js
Last active June 25, 2024 07:34
I keep getting shown the "Stay signed in" page on Microsoft domains, even when I select "don't show this again" - this script will automatically click on "yes" for you every time the page comes up.
// ==UserScript==
// @name Stay signed in to MS
// @description Automatically click "yes" on the Microsoft "stay signed in" page that keeps appearing.
// @downloadURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js
// @updateURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js
// @namespace https://gist.github.com/emlyn/
// @version 0.6
// @author Emlyn Corrin
// @match https://login.microsoftonline.com/*
// @match https://login.live.com/*
@emlyn
emlyn / show_password.user.js
Last active September 28, 2024 22:16
Show Passwords with double click
// ==UserScript==
// @name Show Passwords
// @description Double click on password fields to show password
// @downloadURL https://gist.github.com/emlyn/979b2820eaa74fea01b8ddc1351a0f60/raw/show_password.user.js
// @updateURL https://gist.github.com/emlyn/979b2820eaa74fea01b8ddc1351a0f60/raw/show_password.user.js
// @namespace https://gist.github.com/emlyn
// @version 0.3
// @author Emlyn Corrin
// @match http*://*/*
// @grant none

Rule The World

- Take That

on Sonic Pi

A self-contained version of what I have in my sonic-pi-experiments repo. It uses my play-helper and lyrics helpers, so here I've pasted them into the buffer so anyone can run it.

Here's a recording of it on Soundcloud.

Let it be

- The Beatles

on Sonic Pi

A self-contained version of what I have in my sonic-pi-experiments repo. It uses my guitar helper, so here I've pasted it into the buffer so anyone can run it.

Here's a recording of it on Soundcloud.

with_fx :reverb do
use_synth :piano
play:E5, amp: 0.7, sustain: 1, release: 3
sleep 0.20
piano_intro
end
with_fx :reverb do
in_thread(name: :piano) do
loop do
@emlyn
emlyn / README.md
Last active June 13, 2022 12:49
Sonic Pi Lissajous synth & Harmonograph figures

Sonic Pi Lissajous synth & Harmonograph figures

This gist contains a custom Sonic Pi synth for generating Lissajous figures, along with some Sonic Pi code to generate the figures in the post on in-thread

The source for the synthdef is in lisa.scsynth, with a compiled version available for download at lisa.scsyndef.

The Sonic Pi code is split into three parts, for the three figures in the post: