- Install IntelliJ
- IntelliJ > Preferences > Plugins > Install Scala > Restart IntelliJ
- Create New Project > Scala > SBT
- JDK: 1.8
- SBT: 0.13
- Scala: 2.11
- Add this to
build.sbt
:
I hereby claim:
To claim this, I am signing this object:
select | |
id, | |
"utcStartTime", | |
"utcOffset", | |
"localStartTime" || "utcOffset" as "startTime" | |
from ( | |
select | |
id, | |
"startTime" as "utcStartTime", | |
("startTime" at time zone 'UTC' at time zone "timezoneOffset")::timestamp as "localStartTime", |
import sss from 'shamirs-secret-sharing' | |
const { crypto } = window | |
const u8ToB64 = u8 => Buffer.from(u8).toString('base64') | |
const b64toU8 = b64 => Buffer.from(b64, 'base64') | |
async function sssDemo() { | |
const keypair = await crypto.subtle.generateKey( | |
{ | |
name: 'RSA-OAEP', |
import { errorHandler } from 'express-rest-error'; // need version 1.2.0+ | |
// Make postgres errors more user-friendly | |
const pgErrorPatterns = [ | |
{ | |
regex: /null value in column "(.*)" violates not-null constraint/, | |
assign: (match) => ({ | |
message: `${match[1]} is required`, | |
required: [match[1]], | |
}), |