start new:
tmux
start new with session name:
tmux new -s myname
// Install npm i pg-mem --save-dev | |
import { DataSource, Repository } from 'typeorm'; | |
import { newDb, DataType } from 'pg-mem'; | |
import { v4 } from 'uuid'; | |
const setupDataSource = async () => { | |
const db = newDb({ | |
autoCreateForeignKeyIndices: true, | |
}); |
Number.prototype.map = function (in_min, in_max, out_min, out_max) { | |
return (this - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |
/** | |
* Converts YouTube formatted duration to seconds. | |
* | |
* Expects input String of the form "PT#M#S", in which the letters PT indicate | |
* that the value specifies a period of time, and the letters M and S refer to | |
* length in minutes and seconds, respectively. The # characters preceding the | |
* M and S letters are both integers that specify the number of minutes (or | |
* seconds) of the video. For example, a value of PT15M51S indicates that the | |
* video is 15 minutes and 51 seconds long. | |
*/ |
#!/usr/bin/env node | |
var net = require('net'); | |
var client = net.connect(1234, "localhost"); | |
client.pipe(process.stdout); | |
client.on('connect', function () { | |
console.log("Connected!"); |
license: gpl-3.0 | |
redirect: https://observablehq.com/@mbostock/the-suns-view-of-the-earth |
As configured in my dotfiles.
start new:
tmux
start new with session name: