Skip to content

Instantly share code, notes, and snippets.

View dpetranek's full-sized avatar

Daniel Petranek dpetranek

View GitHub Profile
@dpetranek
dpetranek / plink-plonk.js
Created February 16, 2020 03:42 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@dpetranek
dpetranek / rhymes.clj
Created December 14, 2017 02:21 — forked from ftrain/rhymes.clj
Annotated rhyming dictionary
;; This is at: https://gist.github.com/8655399
;; So we want a rhyming dictionary in Clojure. Jack Rusher put up
;; this code here:
;;
;; https://gist.github.com/jackrusher/8640437
;;
;; I'm going to study this code and learn as I go.
;;
;; First I put it in a namespace.

Host Your Site Under Your Domain on IPFS

This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 1GB RAM).

Install IPFS

Log in as root.

First, make sure the system is up to date, and install tar and wget:

@dpetranek
dpetranek / custom
Created August 15, 2017 18:58 — forked from zoqaeski/custom
xkbcomp keyboard layout dump
// $XDG_CONFIG_HOME/xkb/symbols/custom
// Makes ALT + CAPS_LOCK act as 3rd level switch
// Works sporadically
partial modifier_keys
xkb_symbols "alt_caps_mode_switch" {
key <CAPS> {
type[Group1]="PC_ALT_LEVEL2",
[ Caps_Lock, ISO_Level3_Shift ]
};
@dpetranek
dpetranek / .gitattributes
Created April 10, 2017 19:18 — forked from amalloy/.gitattributes
Clojure-aware git-diff hunk headers
*.clj diff=clojure
*.cljs diff=clojure
*.cljx diff=clojure
;; clojure.spec's missing piece, work in progress
;; this is only halfway done, somebody else will need to do the other 95%
(require
'[clojure.spec :as s]
'[clojure.spec.test :as test])
(defn naive-english-explain
"Copy and paste this into your app. Figure out what it does by
trying it in production."