Skip to content

Instantly share code, notes, and snippets.

@sai-fe
sai-fe / stooge_loader.rb
Created April 18, 2017 22:19 — forked from bowsersenior/stooge_loader.rb
A demo of YAML anchors, references and nested values
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {
@sai-fe
sai-fe / Makefile
Created December 30, 2016 14:14 — forked from alfonsodev/Makefile
example Makefile of a Node.js project to create code coverage reports mocha, instanbul, coveralls
#!/bin/bash
MOCHA=node_modules/.bin/mocha
ISTANBUL=node_modules/.bin/istanbul
COVERALLS=node_modules/coveralls/bin/coveralls.js
# test files must start with "test*.js"
TESTS=$(shell find test/ -name "test*.js" -not -path "*service/*")
SERVICETEST=$(shell find test/service/ -name "test*.js" )
test:
$(MOCHA) -R spec $(TESTS)
test-service:
@sai-fe
sai-fe / .eslintrc.json
Created December 29, 2016 21:52 — forked from deepakshrma/.eslintrc.json
.eslintrc.json- Basic configuration for ESLint
{
"env": {
"node": true
},
"globals":{
"anyglobal":true
},
"extends": "eslint:recommended",
"rules": {
"accessor-pairs": "error",