Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bochenski on github.
  • I am bochenski (https://keybase.io/bochenski) on keybase.
  • I have a public key whose fingerprint is DDA6 7F27 ABA2 381D 0AC9 8A45 88A2 35FD 05C8 4834

To claim this, I am signing this object:

@Bochenski
Bochenski / app.go
Created July 9, 2014 14:41
Negroni golang mgo middleware example
package main
import (
"github.com/codegangsta/negroni"
"github.com/gorilla/context"
"github.com/unrolled/render"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"log"
"net/http"
#!/bin/bash
# Setup and start Sauce Connect for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# SAUCE_USERNAME
# SAUCE_ACCESS_KEY
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
#
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
@Bochenski
Bochenski / pre-commit
Created June 8, 2011 18:23
Git pre-commit hook that checks whether changes have been made to a subfolder and if they have runs tests (currently on the play framework but easily adjustable) aborting the commit unless tests pass. Great for continuous integration purposes.
#!/bin/bash
#A hook script to ensure that all tests are passing before committing
#The script tests whether changes have been made in the relevant directory
pwd
sometext=`git status`
if [[ "$sometext" =~ 'play/stocksystem/' ]];
then
echo "you changed something in the stocksystem"
echo "running tests before proceeding with commit"
play auto-test ./play/stocksystem