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
const base64_arraybuffer = async (data) => {
// Use a FileReader to generate a base64 data URI
const base64url = await new Promise((r) => {
const reader = new FileReader()
reader.onload = () => r(reader.result)
reader.readAsDataURL(new Blob([data]))
})
/*
The result looks like
### A Pluto.jl notebook ###
# v0.17.2
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 / sample Tower of Hanoi 0.15.0.html
Created December 1, 2021 13:47
some HTML exports from different Pluto versions
<!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) and Mikołaj Bochenski (https://github.com/malyvsen) 🌈")
</script>
<!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 🌈"
)
### A Pluto.jl notebook ###
# v0.17.2
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 / TagBot output.md
Created November 23, 2021 11:58
Demo of automatic changelog by JuliaRegistries/TagBot vs built-in github API

Pluto v0.16.1

Diff since v0.16.0

Closed issues:

  • Live docs for Vector shows docs for Array (#750)
  • WYSIWYR: api.json and rapidoc (#1298)
  • MultiSelect does not stay selected upon @binding (#1316)
  • Error: failed to add/remove packages, could not parse compatibility version (#1322)
### A Pluto.jl notebook ###
# v0.15.0
using Markdown
using InteractiveUtils
# ╔═╡ ffadbd73-346c-42f2-8a42-fda58ad61142
using HypertextLiteral, PlutoUI
# ╔═╡ 239bd70d-e64f-4261-98d7-d0a6899f1de7
### A Pluto.jl notebook ###
# v0.14.0
using Markdown
using InteractiveUtils
# ╔═╡ eeba1594-8643-11eb-02f2-f3245bcc2bd9
begin
import Pkg
Pkg.activate(mktempdir())

How to join the Pluto zulip

The best way to get in touch with fellow Pluto users is to join our zulip chat. Zulip is a chatting website (similar to Slack), but it is free, which means that you can also read old messages.

We are a subchannel of the Julia zulip. To join it:

  1. Click here to join the Julia zulip: https://julialang.zulipchat.com/
  2. Create an account, or log in with github/google.
  3. After logging in, you need to Add the Pluto stream using this button:

####!! means that I took the measurement again after fixing the problem
import Pluto
import Pluto: Cell, ServerSession, Notebook, FunctionName, ClientRequest
import Pluto.Firebasey
import Pluto.WorkspaceManager
using UUIDs
using BenchmarkTools