Skip to content

Instantly share code, notes, and snippets.

View jarlah's full-sized avatar

Jarl André Hübenthal jarlah

View GitHub Profile
@jarlah
jarlah / watcher.sh
Created November 16, 2023 15:20 — forked from josevalim/watcher.sh
A 1LOC bash script for re-running tests whenever a lib/ or test/ file changes keeping the same VM instance
# You will need fswatch installed (available in homebrew and friends)
# The command below will run tests and wait until fswatch writes something.
# The --stale flag will only run stale entries, it requires Elixir v1.3.
fswatch lib/ test/ | mix test --stale --listen-on-stdin
@jarlah
jarlah / index.ts
Last active September 20, 2021 16:50
Test app cognite
import { CogniteClient } from '@cognite/sdk';
import { OidcClientCredentials } from './OidcClientCredentials';
import { OIDCClientCredentialsMethod } from "./types/OIDCClientCredentialsMethod"
const client = new CogniteClient({
baseUrl: 'https://<CLUSTER>.cognitedata.com',
appId: 'test-app'
});
@jarlah
jarlah / slick.conf
Created May 9, 2020 08:04
Play Scala and Slick 3: How to connect to postgresql database that requires certificate for connecting
slick.dbs.default.profile = "slick.jdbc.PostgresProfile$"
slick.dbs.default.db.driver = "org.postgresql.Driver"
slick.dbs.default.db.url = "jdbc:postgresql://localhost:5432/<db>"
slick.dbs.default.db.user = "<user>"
slick.dbs.default.db.password = "<password>"
slick.dbs.default.db.properties.ssl = "true"
slick.dbs.default.db.properties.sslmode = "verify-ca"
slick.dbs.default.db.properties.sslfactory = "org.postgresql.ssl.jdbc4.LibPQFactory"
slick.dbs.default.db.properties.sslpassword = "<pass>" // or comment out if no password on postgresql.pk8
slick.dbs.default.db.properties.sslcert = "<path>/postgresql.crt" // the client certificate
object Generators extends App {
trait Tree
case class Inner(left: Tree, right: Tree) extends Tree
case class Leaf(x: Int) extends Tree
trait Generator[T] {
self =>

Keybase proof

I hereby claim:

  • I am jarlah on github.
  • I am jarlah (https://keybase.io/jarlah) on keybase.
  • I have a public key ASAPCvD5rDCTsdFUH3mjv_I4pP9_ZJI2qlbuMXa2QcpN4Ao

To claim this, I am signing this object:

@jarlah
jarlah / echelon.zsh
Created May 5, 2017 21:00 — forked from kpmeen/echelon.zsh
My custom ZSH themes...
# echelon
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function box_name {
hostname -s
}
@jarlah
jarlah / gist:a4deac8aafeccc8147ff77fdb3673851
Created February 10, 2017 17:55
xinput list-props "DLL06E5:01 06CB:7A13 Touchpad"
Device 'DLL06E5:01 06CB:7A13 Touchpad':
Device Enabled (140): 1
Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (268): 1
Device Accel Constant Deceleration (269): 2.500000
Device Accel Adaptive Deceleration (270): 1.000000
Device Accel Velocity Scaling (271): 12.500000
Synaptics Edges (298): 49, 1179, 50, 878
Synaptics Finger (299): 25, 30, 0
Synaptics Tap Time (300): 180