Skip to content

Instantly share code, notes, and snippets.

Avatar
🏄‍♂️
Shredding the software gnar.

Derek Dowling derekdowling

🏄‍♂️
Shredding the software gnar.
View GitHub Profile
@derekdowling
derekdowling / action-button.hbs
Created Sep 10, 2015
Simple Action Button in Ember 2.0
@derekdowling
derekdowling / authenticator_test.go
Created Oct 11, 2014
GoConvey Tests for Authenticator Package
View authenticator_test.go
package authentication
import (
"code.google.com/p/go.crypto/bcrypt"
. "github.com/smartystreets/goconvey/convey"
"log"
"strings"
"testing"
)
@derekdowling
derekdowling / authenticator.go
Created Oct 11, 2014
Basic Password Handler for Go Apps/Websites
View authenticator.go
package authentication
// This will handle all aspects of authenticating users in our system
// For password managing/salting I used:
// http://austingwalters.com/building-a-web-server-in-go-salting-passwords/
import (
"code.google.com/p/go.crypto/bcrypt"
"crypto/rand"
"log"
@derekdowling
derekdowling / TestKernel.php
Last active Aug 29, 2015
Non-PHPUnit based Symfony TestKernel
View TestKernel.php
<?php namespace PROJECT\Tests;
// PATH TO YOUR AUTOLOADER
require_once(__DIR__ . '/../../../../app/autoload.php');
// PATH TO YOUR SYMFONY APP KERNEL
require_once(__DIR__ . '/../../../../app/AppKernel.php');
use AppKernel;
@derekdowling
derekdowling / Dynamic Alternating Grid
Last active Dec 11, 2015
Dynamically Generate Content In A Grid Rows Using Jade
View Dynamic Alternating Grid
- var row = 0;
each tweet, t in twitter
if t % 3 == 0
.row-fluid.tweets
- row = row + 1
each rowElement in twitter.slice(t, t + 3)
.span4
if row % 2 == 0
.span3.image
img(src='../public/img/twitter/#{tweet.handle}.jpg')
View Clean merged branches from Gist
#!/bin/sh
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
You can’t perform that action at this time.