Skip to content

Instantly share code, notes, and snippets.

View fonsp's full-sized avatar
🌳
climbing

Fons van der Plas fonsp

🌳
climbing
View GitHub Profile

Guitar tab "Adrianne Lenker - Free Treasure"

(posted on gist because ultimateguitar is sad capitalism)

Based on https://www.youtube.com/watch?v=N1byELFnNn0 which seems easier than what Lenker played on the recording :)

Watch the video and notice that you let go of the last chord and play open strings for one beat before holding the next chord.

@fonsp
fonsp / jupytercon demo.jl
Last active February 7, 2024 11:04
Two notebooks/slides from my JupyterCon 2023 talk about Pluto.jl – https://www.youtube.com/watch?v=Rg3r3gG4nQo
### A Pluto.jl notebook ###
# v0.19.27
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
### A Pluto.jl notebook ###
# v0.19.37
using Markdown
using InteractiveUtils
# ╔═╡ 77da0af3-13b8-46ba-bd6a-9ed938474c59
accesibility_def = md"""
!!! warning "Definition"
Let's define the **Accessibility** of a package/software as:
### A Pluto.jl notebook ###
# v0.19.32
using Markdown
using InteractiveUtils
# ╔═╡ 349fd1ca-7d1f-4150-9f6e-c0a5401f7d09
using BenchmarkTools
# ╔═╡ 3062003c-7ef9-11ee-3894-4bb027622ad4
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<meta charset="utf-8" />
<meta name="pluto-insertion-spot-meta">
@fonsp
fonsp / bas64url benchmark.jl
Created March 7, 2022 20:26
JS and Julia implementations for base64url, a non-standard variant of base64. See https://en.wikipedia.org/wiki/Base64#Variants_summary_table
### A Pluto.jl notebook ###
# v0.18.1
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
@fonsp
fonsp / client.jl
Last active February 3, 2022 00:25
Simple TCP server and client in Julia
using Sockets
import Sockets: connect
using Logging
ENV["JULIA_DEBUG"] = Main
Base.@kwdef struct 🐸ServerConnection
stream::IO
read_task::Task
➜ registries ls
General General.tar.gz General.toml PlutoPackages
➜ registries rm -r *
zsh: sure you want to delete all 4 files in /Users/fons/.julia/registries [yn]? y
➜ registries ls
➜ registries # no registries
➜ registries julia16
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
import Pluto: Pluto, update_run!, WorkspaceManager, ClientSession, ServerSession, Notebook, Cell, SessionActions
using BenchmarkTools
🍭 = ServerSession();
# 🍭.options.evaluation.workspace_use_distributed = false
fakeclient = ClientSession(:fake, nothing);
🍭.connected_clients[fakeclient.id] = fakeclient;
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<title>⚡ Pluto.jl ⚡</title>
<meta charset="utf-8" />
<script>
console.log(
"Pluto.jl, by Fons van der Plas (https://github.com/fonsp), Mikołaj Bochenski (https://github.com/malyvsen), Michiel Dral (https://github.com/dralletje) and friends 🌈"
)