Skip to content

Instantly share code, notes, and snippets.


Allan Ebdrup ebdrup

View GitHub Profile
ebdrup / logInfo.js
Last active Aug 29, 2015
Logging info with errors in Muscula
View logInfo.js
//This information will be logged and aggregated with your errors
//It will be shown on the details of each error group = {
email: "",
sessionId: 42,
lovesDogs: true
//and your own properties and values
ebdrup / test.js
Created Jun 23, 2013
Logging your own error with Muscula
View test.js
try {
//your code, that may cause an error...
} catch(ex){
Muscula.errors.push(ex); //Log error to Muscula
ebdrup /
Last active Dec 17, 2015
Setting up .bashrc to run tests with npm test before git push.

Github does not provide pre-receive hooks, so in order to ensure that all tests are run before a push is accepted, you should add the following to your %HOME%/.bashrc file (node.js example - something similar can be done for .Net):

# begin: automatic run of tests
GIT_LOCATION=$(which git)
git () {
  if [ "$1" == "push" ] && [ -f package.json ] ; then
		if [[ "$*" == *\ --no-verify* ]] ; then
			echo "skipping tests..."
			# skip the testing and remove the custom --no-verify option before calling git
ebdrup / JSON.cs
Created Mar 10, 2013
JSON mixin like underscore extend for dotNet (works on JSON strings not Objects). Relies on Newtonsoft.Json from
View JSON.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Newtonsoft.Json;
namespace CopenhagenCode
public class JSON
You can’t perform that action at this time.