hoard-compose
running
This application will join the docker network created by hoard-compose
, or manually create it using docker network create waylay
.
# also copies over metadata like album art | |
for i in *.flac; do echo $i; ffmpeg -i "$i" -y -v 0 -vcodec copy -acodec alac "${i%.flac}".m4a && rm -f "$i"; done |
package main | |
import ( | |
"github.com/hashicorp/serf/serf" | |
"log" | |
"os" | |
"os/signal" | |
"syscall" | |
) |
package main | |
import ( | |
"fmt" | |
"gonum.org/v1/gonum/graph" | |
"gonum.org/v1/gonum/graph/simple" | |
"gonum.org/v1/gonum/graph/traverse" | |
) | |
// GraphNode is a node in the DAG |
const a = [1, 2, 3] | |
const b = [1, 1, 3] | |
const c = [3, 2, 1] | |
function verticalSum (...args) { | |
return args.reduce((acc, a) => acc.map((n, i) => n + a[i]), new Array(args.length).fill(0)) | |
} | |
const result = verticalSum(a, b, c) | |
console.log(result) |
import React, { Fragment, useState } from 'react' | |
import Button from '../button/button' | |
function Counter (props) { | |
const [count, setCount] = useState(props.initialCount) | |
function increment () { | |
setCount(count + 1) | |
} |
{ | |
"name": "my-awesome-app", | |
"jest": { | |
"snapshotSerializers": [ | |
"jest-snapshots-json-rest-api" | |
] | |
} | |
} |
const app = require('./app') | |
const request = require('supertest') | |
test('get a user', async () => { | |
const response = await request(app) | |
.get('/users/1') | |
expect(response.status).toBe(200) | |
expect(response).toMatchSnapshot() | |
}) |
exports[`get a user 1`] = `{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"properties": { | |
"created_at": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"first_name": { |
'use strict' | |
const AMOUNT = 300000 | |
const YEARS = 25 | |
const RATE = 2.19 | |
const MONTHS = yearsToMonths(YEARS) | |
const MONTHLY = monthly(AMOUNT, YEARS, RATE) | |
// generate an array with shorted name of each month |