Skip to content

Instantly share code, notes, and snippets.

View justinpage's full-sized avatar

Justin Page justinpage

View GitHub Profile
const logger = require('pino')({
timestamp: () => `,"time":"${new Date().toISOString()}"`
})
const LIMIT = 5
let c = {uuid: '6d20a81a-28f9-4fb7-8ee8-2f742bc6d9a2'}
let e = {msg: `Timeout: failed to get response in ${LIMIT} seconds`}
logger.error({cxt: c, err: e}, 'getImages: Failed to get images from API')
@justinpage
justinpage / index.js
Last active September 17, 2021 01:19
const logger = require('pino')({
timestamp: () => `,"time":"${new Date().toISOString()}"`
})
const LIMIT = 5
let c = {uuid: '6d20a81a-28f9-4fb7-8ee8-2f742bc6d9a2'}
let e = {msg: `Timeout: failed to get response in ${LIMIT} seconds`}
logger.error({cxt: c, err: e}, 'getImages: Failed to get images from API')
#!/bin/bash
in=./audio/
out=./video/
image=./flylo.png
for file in `ls $in`
do
ffmpeg -loop 1 -i $image -i $in/$file -c:a copy -c:v libx264 -shortest $out/${file/mp3/mp4}
done
package main
import "fmt"
func main() {
fmt.Println("goodbye")
}
package main
import (
"fmt"
)
func main() {
fmt.Println("hello")
}

is GoDoc Go Report Card Build Status

Professional lightweight testing mini-framework for Go.

  • Easy to write and read
  • Beautifully simple API with everything you need: is.Equal, is.True, is.NoErr, and is.Fail
  • Use comments to add descriptions (which show up when tests fail)

Failures are very easy to read:

Examples of failures

‰PNG
x26
IHDR
x02à
x02=x08x06
‰PNG
x26
IHDR
x02à
x02=x08x06
‰PNG
x26
IHDR
x03R
x02:x08x06
\version "2.20.0"
\language "english"
\score { % start of single compound music expression
\new StaffGroup << % start of simultaneous staves section
\time 2/4
\new Staff { % create RH staff
\clef "treble"
\key g \minor
\new Voice { % create voice for RH notes