Skip to content

Instantly share code, notes, and snippets.

View knuton's full-sized avatar
🌱

Johannes Emerich knuton

🌱
View GitHub Profile
@knuton
knuton / otsbjs.md
Created May 25, 2012 16:08 — forked from janl/otsbjs.md
Open Tech School Berlin JS

In the spirit of Railsgirls Berlin, we want to start a programming education group for JavaScript. We need your help to get all the coaching done.

If you are interested in coaching JavaScript, fork this gist and add yourself or leave your contact data in a comment:

@knuton
knuton / awodey-errata.tex
Last active December 23, 2015 19:59
Currently unlisted errors in Awodey (2010) (as of 4/2011 version of http://www.andrew.cmu.edu/user/awodey/CT2errata2010.pdf)(as of yet unconfirmed)
% Take with a grain of salt, for I know not what I'm doing.
Chapter 2:
p. 30, L 23: "$hx, hy: 1 \to N$ of $N$" should be "$|h|x, |h|y: 1 \to |N|$ of $|N|$"
Chapter 7:
p. 156, L 27: "think of a natural transformation $\vartheta_C: FC \to GC$" should be "think of a natural transformation $\vartheta: F \to G$"
@knuton
knuton / software-foundations-errata.coq
Last active December 27, 2015 11:59
Collecting errata for "Software Foundations" http://www.cis.upenn.edu/~bcpierce/sf/index.html
(** Basics.v, More Exercises
"similar to the previous one but where the second hypothesis says" should simply be
"similar to the previous one but where the hypothesis says"*)
@knuton
knuton / Trans.v
Created January 26, 2014 20:55
Illustration of a problem with transitive relations in Coq
Require Import Omega.
Require Import Coq.Setoids.Setoid.
Inductive trans_r : nat -> nat -> Prop :=
| trans_r_base : trans_r 0 3
| trans_r_plus : forall m n, trans_r m n -> trans_r (m+3) (n+3)
| trans_r_trans : forall m n o, trans_r m n -> trans_r n o -> trans_r m o.
Example trans_r_6_9 : trans_r 3 9.
Proof.
@knuton
knuton / javascript_helper.rb
Created October 19, 2013 18:53
Helper for inlining minified JavaScripts from the Rails Asset Pipeline/Sprockets
def javascript_inline_tag(asset_path)
content_tag(
:script,
raw(Uglifier.new.compile(AppName::Application.assets.find_asset(asset_path).to_s))
)
end
@knuton
knuton / setup-pseudo-senso.sh
Last active August 14, 2017 15:37
Script to set up a "pseudo Senso" on Raspbian
# Purpose: Set up the Senso driver to run as a Senso simulator on boot
# Requires ARMv7 or newer.
# Usage: curl -L https://git.io/vQIGb | sudo sh -e
PARENT_DIR=$(pwd)
SETUP_DIR="pseudo-senso"
DRIVER_VERSION="v0.3.2"
export DEBIAN_FRONTEND=noninteractive
@knuton
knuton / descartes-quotes.md
Created September 27, 2017 17:40
Descartes on the Uses of Meditation

Descartes on Meditation

Themes

  1. Meditation as Experimental Introspection 🔶/MEI
  2. Meditation as Mental Purification 🔷/MMP

The coloured diamonds are for skimming, the abbreviations for textual search.

@knuton
knuton / install.ps1
Last active July 8, 2020 13:32
Install dividat driver as Windows service
# This script will download and install Dividat Driver as a Windows service.
## Configuration ##########################################
$releaseUrl = "https://dist.dividat.com/releases/driver2/"
$channel = "master"
$installDir = "C:\Program Files\dividat-driver"
###########################################################
$ErrorActionPreference = "Stop"
@knuton
knuton / grouplikes.dot
Created October 18, 2020 11:57
Lattice of group-like structures
digraph G {
rankdir = BT;
node [ shape=box ];
small_cat [ label="small cat" ];
commutative_monoid [ label="commutative monoid" ];
inverse_semigroup [ label="inverse semigroup" ];
unital_magma [ label="unital magma" ];
abelian_group [ label="abelian group" ];
@knuton
knuton / nvaltalt.bash
Last active July 29, 2021 10:16
Notational Velocity/nvALT approximation using fzf, ripgrep and awk
# Bash function to approximate Notational Velocity using fzf and ripgrep.
#
# Will search for and preview matching files based on name and content, then open with $EDITOR on enter.
# Assumes Markdown files.
#
# Based on
# - https://demu.red/blog/2021/04/a-notational-velocity-stopgap-solution-for-linux/
# - https://github.com/junegunn/fzf#3-interactive-ripgrep-integration
function note() {
pushd ~/notes 1>/dev/null && \