Skip to content

Instantly share code, notes, and snippets.


David Barri japgolly

View GitHub Profile
japgolly /
Created Jul 25, 2021 — forked from madkoding/
Pairing bluetooth devices (keyboard or mouse) in dual boot with Linux Ubuntu and Windows 10

1) Pair ALL bluetooth devices in linux (it is to have the files you will need to edit later)

2) Pair ALL bluetooth devices in Windows 10. If you know how, get the MAC address id from your bluethooth keyboard, we will need it later

3) Reboot and go back to Linux

4) Install chntpw package, this is needed to read the registry keys from Wintendo

sudo apt-get install chntpw
japgolly / gist:94242805800d8dc17c4eef55ec1550d6
Last active Sep 12, 2020
View gist:94242805800d8dc17c4eef55ec1550d6
3x 21/8 + 18/8
|C c c c c c c |c c c c c c c |c c c c c c c |c c c c c cc c |
| s s| s s| s s| s |
|k k kk k k k kk k k |k k kk k k k kk k k |k k kk k k k kk k k |k k kk k k k kk k |
japgolly /
Created Apr 11, 2020
--- base-db/src/main/java/org/postgresql/jdbc/
+++ base-db/src/main/java/org/postgresql/jdbc/
@@ -88,11 +88,11 @@
{"bit", Oid.BIT, Types.BIT, "java.lang.Boolean", Oid.BIT_ARRAY},
{"date", Oid.DATE, Types.DATE, "java.sql.Date", Oid.DATE_ARRAY},
{"time", Oid.TIME, Types.TIME, "java.sql.Time", Oid.TIME_ARRAY},
{"timetz", Oid.TIMETZ, Types.TIME, "java.sql.Time", Oid.TIMETZ_ARRAY},
{"timestamp", Oid.TIMESTAMP, Types.TIMESTAMP, "java.sql.Timestamp", Oid.TIMESTAMP_ARRAY},
- {"timestamptz", Oid.TIMESTAMPTZ, Types.TIMESTAMP, "java.sql.Timestamp",
+ {"timestamptz", Oid.TIMESTAMPTZ, Types.TIMESTAMP_WITH_TIMEZONE, "java.sql.Timestamp",
View aws-ecs-taskdef.json
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
japgolly / copy.sbt
Last active Oct 1, 2019
Scala.JS & SBT
View copy.sbt
// Assumptions:
// 1. You have one or more Scala.JS modules named jsModule1, jsModule2, ...
// 2. You have a web-serving (or otherwise JVM) module that will serve the JS assets
// The only "webby"/JS plugin I use apart from Scala.JS itself, is xsbt-web-plugin,
// and even that, only on my pre-http4s projects.
// xsbt-web-plugin allows me to quickly stop/start a servlet container from SBT.
// The snippet below is for "webappPostProcess" which is an xsbt-web-plugin task but
// if you aren't using it, you can just create a task with the same content and make
// "package" depend on it.
japgolly / 0.deps.gv.svg
Last active Apr 2, 2020
My Scala libraries & the status of their upgrade to Scala 2.13
View 0.deps.gv.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
japgolly /
Last active Apr 12, 2020
Scala 2.13 migration notes


addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.13")
import scalafix.sbt.ScalafixPlugin.autoImport.{scalafixDependencies, scalafixSemanticdb}

scalafixDependencies in ThisBuild += "org.scala-lang.modules" %% "scala-collection-migrations" % "2.1.4",
View Template.scala
package shipreq.base.util
import java.util.UUID
import scalaz.Functor
import scalaz.syntax.functor._
import scalaz.Scalaz.Id
/** Takes a potentially slow `String* => String` function and makes it super fast by executing it once,
* turning the result into a template, then using the template for all subsequent calls.
japgolly / .bashrc
Created Dec 6, 2018
Graal docker alpine
View .bashrc
export PS1='\n\[\e[32m\]\u@\h: \[\e[33m\]\w\[\e[0m\]\n> '
export BASH=/bin/bash
export SHELL=$BASH
export LS_OPTIONS='--color=auto'
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias la='ls $LS_OPTIONS -la'
japgolly / jetty-web.xml
Created Nov 11, 2018
Graal on Jetty (WEB-INF/jetty-web.xml)
View jetty-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Call name="addSystemClass">