Skip to content

Instantly share code, notes, and snippets.

Working from home

Joshua Barnett joshua-barnett

Working from home
View GitHub Profile
joshua-barnett / grpc.js
Last active Apr 9, 2021
gRPC + JSON in Node.js
View grpc.js
const process = require('process');
const grpc = require('@grpc/grpc-js');
* $ node grpc.js server
* Server listening { port: 9001 }
* Received { request: { message: 'Hello Server!' } }
* $ node grpc.js client
joshua-barnett / mongo-test.js
Created Dec 18, 2020
Create MongoDB container that starts and initializes itself as a single node replicaset
View mongo-test.js
const Docker = require('dockerode');
(async () => {
const docker = new Docker();
const container = await docker.createContainer({
name: 'mongodb',
Image: 'mongo:4.0.20@sha256:dd4cbe24eb8233db92b871cc556b77efcc7f9e67bc9516579796d4d08818273e',
Cmd: [
View resume.json
"basics": {
"email": "",
"label": "Professional Keyboard Slapper 👋 ⌨️ 💻",
"location": {
"city": "Cambridge",
"countryCode": "GB"
"name": "Joshua Barnett",
"profiles": [
View keybindings.json
// Place your key bindings in this file to overwrite the defaults
"key": "shift+cmd+]",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
"key": "shift+cmd+[",
"command": "workbench.action.terminal.focusPrevious",
View settings.json
"html.format.wrapAttributes": "force",
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"terminal.integrated.fontFamily": "Meslo LG S DZ for Powerline",
"files.associations": {
"Dockerfile*": "dockerfile"
"terminal.integrated.scrollback": 5000,
"vsicons.dontShowNewVersionMessage": true,

macOS Fixes

# Install Homebrew (
/usr/bin/ruby -e "$(curl -fsSL"

# Install Desktop Applications
brew cask install \
  docker \
  firefox \
joshua-barnett /
Created Sep 28, 2017
Docker - Running multiple commands and logging uniformly
touch /var/log/first.log
touch /var/log/second.log
./first /var/log/first.log 2>&1 | ./second /var/log/second.log 2>&1 | tail -f -n +1 /var/log/first.log /var/log/second.log
View GridModel.ts
import { Model } from "engine/mvc";
import { Signal } from "org/osflash/signals";
import { SoundAS } from "treefortress/sound";
import { TileModel } from "tile";
import { CellModel } from "cell";
import { GDTAssets } from "assets";
class GridModel extends Model {
protected _width: number;
protected _height: number;
joshua-barnett /
Created May 2, 2017
Generate self-signed SSL certificate and key for HTTPS server
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
joshua-barnett / atp217_clips_app.txt
Last active Apr 20, 2017
An automatically transcribed discussion on ATP about automatic transcription.
View atp217_clips_app.txt
Your transcription for atp217_clips_app.mp3 is now available for download from
Transcriptions can be downloaded as plain text or in a structured JSON format.
But clips came out today I played with it very very very briefly and it's pretty cool. I like the I don't know what the official term for it is but the transcribe what you're saying as you were saying it feature so you can turn on a like text mode or a little speech bubble. And as you record speech will or your speech will appear on screen. So you know you can hold the record and then as you talk you can make it show the words that you're speaking. I just did that as we were recording as I was saying those words. And it says Honda Accord instead of hold while you record.
So already going well I mean you know automated transcription is still a very very long way away from being good reliably. Like even you know we you know we can criticize Apple for li