Skip to content

Instantly share code, notes, and snippets.

View camstuart's full-sized avatar

Cam Stuart camstuart

View GitHub Profile
@camstuart
camstuart / Golang program stdin stdout interaction.md
Created December 4, 2017 02:34 — forked from jamesrr39/Golang program stdin stdout interaction.md
Using stdout and stdin from other programs in Golang

Go program interaction

Example of how to use stdout and stdin from other programs in golang

Requires go

Run

go run parentprocess.go
@camstuart
camstuart / upsert-service-record-test.js
Last active July 18, 2017 15:04
An example usage of a feathersjs hook/service test helper (DatabaseServiceHelper)
const assert = require('assert')
const upsertServiceRecord = require('../../src/hooks/upsert-service-record') // Hook to be tested
const DatabaseServiceHelper = require('../test-helpers/databaseServiceHelper') // The helper I am working on
describe.only('\'upsertServiceRecord\' hook', () => {
before(() => {
this.defaultServiceData = [
{
@camstuart
camstuart / sendMessage.js
Created June 26, 2017 23:22
A nodejs (command line) example of using the feathersjs client
#!/usr/bin/env node
const program = require('commander');
const chalk = require('chalk');
const io = require('socket.io-client');
const feathers = require('feathers/client');
const hooks = require('feathers-hooks');
const socketio = require('feathers-socketio/client');
program