View doseq-with-index.clj
(doseq [[idx item] (map-indexed vector a-lazy-seq)]
(do-stuff! item idx))
while [ $x -le 22222 ]
echo "log entry: $x" >> example.log
x=$(( $x + 1 ))
View onpaste.js
// re-enable paste on your favorite bank's website
document.querySelectorAll('input').forEach(function (input) {
input.setAttribute('onpaste', '');
View polymorphisms.hs
-- The key difference between parametric polymorphism and overloading (aka ad-hoc
-- polymorphism) is that parameteric polymorphic functions use one algorithm to
-- operate on arguments of many different types, whereas overloaded functions may
-- use a different algorithm for each type of argument.
-- John Mitchell, Concepts in Programming Languages
-- ad hoc => typeclasses
plus :: (Num a) => a -> a -> a
View defelem.clj
input (hiccup-def/defelem input [& args] [:input {:name "name" :type "text"}])
(input {:data-foo "bar"}) ;; <input name="name" type="text" data-foo="bar">
View gist:a611f26ff0407a8f577c73577133279e
(ns comp3.core
(:use compojure.core)
(:require [compojure.route :as route]
[ring.adapter.jetty :as jetty]))
(defn simple-logging-middleware [app]
(fn [req]
(println req)
(app req)))
View gist:c97825cb9ead6fe10dcc7515744ee563
### Keybase proof
I hereby claim:
* I am ethagnawl on github.
* I am pdoherty ( on keybase.
* I have a public key whose fingerprint is 2771 6249 A75F 3140 0F37 E1B8 4A88 F756 C5FE A831
To claim this, I am signing this object:
View pg_hba.conf
local all all trust
host all all trust
host all all ::1/128 trust
host all all all md5
View deploy.hs
{-# LANGUAGE OverloadedStrings #-}
import Shelly
main = shelly $ do
run "echo" ["hello", "world"]
run "git" ["stash", "save"]
run "git" ["checkout", "develop"]
run "stack" ["clean"]
run "stack" ["build"]

This python script is intended to automate the extraction of embedded certificates and keys from OpenVPN config files.

Unfortunately the GNOME Network-Manager is not able to automatically import OpenVPN config files with embedded certificates and keys. A workaround is to manually extract these and store them in separate files (e.g. see


  • Make shure all the required packages are installed. For example on Ubuntu and Debian run:

    $ sudo apt-get install python3 network-manager-openvpn-gnome