View demo.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# The challenge is to understand which licenses we are indirectly including, by just getting a list of tool and license | |
# I'm thinking to post process this later, summarizing, sorting and aggregating in Google Sheets. | |
# For now I just want to get a list | |
# This assumest that all relevant repositories to be local directory in the current folder. | |
## Part I - install all dependencies for all repositories (i.e. all subfolders one level deep from .) |
View marcus.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Employee records | |
- martin: | |
name: Martin D'vloper | |
job: Developer | |
skills: | |
- python | |
- perl | |
- pascal | |
- tabitha: | |
name: Tabitha Bitumen |
View exampleEvent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"context" : { | |
"path" : "/user", | |
"method" : "POST" | |
}, | |
"userId": "123", | |
"name": "Marcus Hammarberg", | |
"age": "43" | |
} |
View anAttemptToResolve.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global require, module*/ | |
var ApiBuilder = require('claudia-api-builder'), | |
api = new ApiBuilder(), | |
Promise = require('bluebird'); | |
module.exports = api; | |
// use a promise for asynchronous processing | |
api.get('/greet/{name}', function(request) { | |
'use strict'; |
View test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var should = require("should"); | |
describe("Configuration", function() { | |
var validateConfig = function(config) { | |
should.exists(config.mode); | |
config.mode.should.not.be.emtpy; | |
should.exists(config.mongoUrl); | |
config.mongoUrl.should.not.be.emtpy; |
View config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoProdUri = process.env.MONGOLAB_URI || 'localhost:27017/myApp_Prod'; | |
var adminUser = { | |
name : process.env.BASIC_USER || 'marcus', | |
pass : process.env.BASIC_PASS || 'koavote' | |
}; | |
var config = { | |
local: { | |
mode: 'local', |
View scaffold_post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#---------/---------------------\---------# | |
#--------|- Jekyll Post Creator -|--------# | |
#---------\---------------------/---------# | |
# Ripped and tweaked from https://gist.github.com/kabrooski/6107707 | |
# Simply put the script in your site directory, edit the configs to fit your setup, and run it with: | |
# ./post "post title" |
View makeReleaseNumber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN = ./node_modules/.bin | |
define release | |
VERSION=`node -pe "require('./package.json').version"` && \ | |
NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \ | |
node -e "\ | |
var j = require('./package.json');\ | |
j.version = \"$$NEXT_VERSION\";\ | |
var s = JSON.stringify(j, null, 2);\ | |
require('fs').writeFileSync('./package.json', s);" && \ |
View maketestkoa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN = ./node_modules/.bin | |
.PHONY: test | |
test: | |
@$(BIN)/mocha \ | |
--harmony-generators \ | |
-u bdd \ | |
-R dot \ | |
-b |
View makefileKwitansi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN = ./node_modules/.bin | |
define release | |
VERSION=`node -pe "require('./package.json').version"` && \ | |
NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \ | |
node -e "\ | |
var j = require('./package.json');\ | |
j.version = \"$$NEXT_VERSION\";\ | |
var s = JSON.stringify(j, null, 2);\ | |
require('fs').writeFileSync('./package.json', s);" && \ |
NewerOlder