Skip to content

Instantly share code, notes, and snippets.

View BoyCook's full-sized avatar

Craig Cook BoyCook

View GitHub Profile
@BoyCook
BoyCook / Makefile
Created October 1, 2013 23:23
Makefile task for tsapp push
ASSETS := $(wildcard assets/*)
BAG = '' # Set bag name here
push:
@for asset in $(ASSETS); do tsapp push_hard $(BAG) `echo $$asset | cut -d '/' -f 2` ; done
tsapp push_hard $(BAG) index.html
@BoyCook
BoyCook / .travis.yml
Created October 1, 2013 13:55
Travis yml for TiddlySpace app with tsapp
node_js:
- "0.10"
language: node_js
before_script:
- npm install -g istanbul
- npm install -g mocha
- pip install -U tsapp
script: make test-cov
after_success:
- make coveralls
@BoyCook
BoyCook / .travis.yml
Created September 17, 2013 21:21
Istanbul configuration for Coveralls via Travis
before_script: 'npm install -g istanbul && npm install -g mocha'
script: 'make test-cov'
after_success: 'make coveralls'
@BoyCook
BoyCook / config.json
Created August 8, 2013 08:47
Git all config
[{
"username": "BoyCook",
"dir": "/Users/boycook/code/boycook",
"protocol": "ssh"
},{
"username": "TiddlySpace",
"dir": "/Users/boycook/code/osmosoft/tiddlyspace",
"protocol": "ssh"
},{
"username": "tiddlyweb",
@BoyCook
BoyCook / .gitignore_global
Last active December 20, 2015 19:28
Git Ignore global config
# git config --global core.excludesfile ~/.gitignore_global
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc
#export CATALINA_HOME=/usr/share/tomcat
export MAVEN_OPTS="-Xms512m -Xmx2048m -XX:MaxPermSize=512m"
# export MAVEN_OPTS="-Xms512m -Xmx2048m -XX:MaxPermSize=512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
export LIQUIBASE_HOME=/usr/share/java/liquibase-2.0.3
export MULE_HOME=/usr/share/java/mule-standalone-3.2.1
export ANT_HOME=/usr/share/ant
export GRAILS_HOME=/usr/share/grails
export REDIS_HOME=/usr/share/redis
export JSCOVERAGE_HOME=/usr/share/jscoverage
export JMETER_HOME=/usr/share/jmeter
@BoyCook
BoyCook / jinx.py
Created July 8, 2013 12:48
TiddlyWeb jinx plugin
def jinx(environ, start_response):
start_response('200', [])
return ['hello world']
def init(config):
config['selector'].add('/jinx', GET=jinx)
@BoyCook
BoyCook / ServerITSpec.js
Last active May 14, 2019 18:28
Integration testing a node.js web app with Mocha
var should = require('should');
var request = require('request');
var url = 'http://localhost:8080';
var HttpServer = require('./server').HttpServer;
var server;
describe('HttpServer', function () {
before(function (done) {
server = new HttpServer({port: 8080}).start(done);
@BoyCook
BoyCook / MessageHelper
Created March 3, 2013 12:22
C# Helper file for using WM_DATACOPY in Win32 API
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.InteropServices;
using System.Diagnostics;
public class MessageHelper
{
@BoyCook
BoyCook / testSpawn.js
Last active December 14, 2015 10:18
Node.js wrapper for starting web app and spawning multiple subprocesses
var spawn = require('child_process').spawn;
var server = require('./server');
var spawns = {};
server.start({port: 8080}, function () {
createSpawn('jasmine-node', [ 'test/spec', '--junitreport', '--forceexit' ], logToConsole, logToConsole);
createSpawn('casperjs', [ 'test', 'test/ui' ], logToConsole, logToConsole);
});
function createSpawn(name, args, stdout, stderr) {