Skip to content

Instantly share code, notes, and snippets.

<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-32312837-1', 'auto');
ga('send', 'pageview');
</script>
@troyswanson
troyswanson / property.js
Created May 29, 2014 15:50
Property or $scope?
/*global angular*/
var app = angular.module('app', []);
app.controller('UsersCtrl', function ($http) {
var that = this;
$http.get('https://api.github.com/users/troyswanson/repos')
.success(function (data) {
that.repos = data;
});
.col, .col-2, .col-1of2, .col-3, .col-1of3, .col-2of3, .col-4, .col-1of4, .col-2of4, .col-3of4, .col-5, .col-1of5, .col-2of5, .col-3of5, .col-4of5, .col-6, .col-1of6, .col-2of6, .col-3of6, .col-4of6, .col-5of6, .col-7, .col-1of7, .col-2of7, .col-3of7, .col-4of7, .col-5of7, .col-6of7, .col-8, .col-1of8, .col-2of8, .col-3of8, .col-4of8, .col-5of8, .col-6of8, .col-7of8 {
display: block;
position: relative;
margin-bottom: 0px;
float: left; }
.col-2, .col-1of2 {
margin-right: 4%; }
.col-1of2 {
@troyswanson
troyswanson / httpd.conf
Created January 4, 2014 04:12
OS X Mavericks default Apache config
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
<?php
$teams = array('team 1', 'team 2', 'team 3');
if((count($teams) % 2) == 1) {
array_push($teams, 'bye');
}
$fixed_team = array_slice($teams, 0, 1);
$rotating_teams = array_slice($teams, 1);