Skip to content

Instantly share code, notes, and snippets.


Terje Sten Bjerkseth terjesb

  • Outnordic
  • Norway
View GitHub Profile
terjesb /
Created Jan 27, 2021 — forked from clivetyphon/
Configuring Meraki Client VPN in Linux

Configuring Meraki Client VPN in Linux

You can try the official Meraki Configuring Client VPN in Linux article for GUI based setup. For terminal based configuration, see below.

Install packages

Install the following packages:

  • strongswan
  • xl2tpd
terjesb /
Created Jan 27, 2021 — forked from Zemnmez/
L2TP / ipsec VPN, Amazon Linux (EC2)
# adapted from
yum -y install epel # different on amazon linux
sudo yum -y install xl2tpd openswan
systemctl start ipsec.service
service ipsec start

# '' is just to help identify. these are all imported into /etc/ipsec.conf.

vim /etc/ipsec.d/ # see next...
View deps.edn
{:paths ["."]
{com.datomic/datomic-free {:mvn/version "0.9.5656"}}}
terjesb / translate.clj
Created Oct 9, 2017 — forked from robert-stuttaford/translate.clj
Language translations for Datomic entities with fallback to base entity
View translate.clj
(ns cognician.db.translate
(:require [datomic.api :as d])
(:import [clojure.lang MapEntry]
[datomic.query EntityMap]))
;;; Language
(def default-language :en-GB)
terjesb / latency.txt
Created May 4, 2017 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
View feed.clj
(def payment-codes-per-block 4096)
(defn create-payment-code-feed
(let [payment-code-feed (chan 10)]
(go-loop []
(let [block-id (allocate-block db)
block-start (* block-id payment-codes-per-block)]
(-> (onto-chan payment-code-feed

Keybase proof

I hereby claim:

  • I am terjesb on github.
  • I am terjesb ( on keybase.
  • I have a public key ASCs6Fb0IkKiaWnHlzmw-wss8s4NI5EUOs8k-wynxTREwgo

To claim this, I am signing this object:

terjesb / mock-connection.clj
Created Dec 9, 2015 — forked from vvvvalvalval/mock-connection.clj
Mocking datomic.Connection for fast in-memory testing
View mock-connection.clj
(ns bs.utils.mock-connection
"Utilities for using Datomic"
(:require [datomic.api :as d])
(:use clojure.repl clojure.pprint)
(:import (java.util.concurrent BlockingQueue LinkedBlockingDeque)
(datomic Connection)))
(defrecord MockConnection
[dbAtom, ^BlockingQueue txQueue]
terjesb / joda-transit.clj
Created Dec 2, 2015 — forked from casperc/joda-transit.clj
Joda DateTime handler for Transit
View joda-transit.clj
;; Adds support to Transit for emitting Joda DateTimes in the same format as standard java.util.Date.
;; Dependencies: [clj-time "0.9.0"] and [com.cognitect/transit-clj "0.8.259"] (newer version will likely still work)
(require '[cognitect.transit :as transit])
(require '[clj-time.coerce :as coerce])
(import '[ ByteArrayOutputStream])
(def ^:private joda-time-verbose-handler
View gist:fbb6cd1026d64c834fdd
(use '[datomic.api :only [db q] :as d])
(def schema
[{:db/doc "A persons name"
:db/id #db/id[:db.part/db]
:db/ident :name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db.install/_attribute :db.part/db}