Skip to content

Instantly share code, notes, and snippets.

View aaronroberson's full-sized avatar

Aaron Roberson aaronroberson

View GitHub Profile
@aaronroberson
aaronroberson / CSSRuleCounter
Created April 4, 2014 20:03
Counts the CSS Rules for each stylesheet
<script>
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
@aaronroberson
aaronroberson / index.html
Last active August 29, 2015 14:00
AngularJS Modules Part 1
<!doctype html>
<html ng-app="myModule">
<head>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="name" placeholder="Enter a name here">
<hr>
@aaronroberson
aaronroberson / app.js
Created April 30, 2014 23:58
AngularJS Controllers Part 1
// Initialize the module
angular.module('myModule', []);
// Access the module via angular.module('myModule');
// Add the controller to the module using method chaining
angular.module('myModule').controller('myController', function($scope) {
// Anything added to the scope is available to the view
$scope.name = 'Aaron Roberson';
});
@aaronroberson
aaronroberson / update_pledge.sql
Last active August 29, 2015 14:00
Update pledge
# REPLACE THE BRACKETS WITH THE APPROPRIATE VALUES
# For example, WHERE user.email = '[the email address]'
# becomes WHERE user.email = 'aaron@blaremedia.net'
# This SELECT query returns the email, pledge and pledge id
# for the user. You will use the pledge id returned from this
# query to update the pledge in the UPDATE query below
SELECT user.email, pledge.pledge, pledge.id
FROM `jos_users` as user
@aaronroberson
aaronroberson / update_team.sql
Created May 3, 2014 18:40
Update team name
#Update team name
UPDATE `jos_ibike_team`
SET name = 'RideSunnyside'
WHERE name = 'Ridesunnyside'
@aaronroberson
aaronroberson / product-filters.json
Created May 15, 2014 23:27
Geekwise Academy Day 2 Assetts
[
{ "id": 1, "name": "Color", "properties": [
{ "id": 0, "name": "Blue", "selected": false },
{ "id": 1, "name": "Red", "selected": false },
{ "id": 2, "name": "Green", "selected": false }
] },
{ "id": 2, "name": "Gender", "properties": [
{ "id": 3, "name": "Female", "selected": false },
{ "id": 4, "name": "Male", "selected": false },
{ "id": 5, "name": "Unisex", "selected": false }
$scope.displayType = 'grid';
$scope.toggleDisplay = function() {
$scope.displayType = ($scope.displayType === 'grid') ? 'list' : 'grid'
}
@aaronroberson
aaronroberson / .bowerrc
Last active August 29, 2015 14:02
Geekwise Day 7 Assetts
{
"directory": "public/bower_components"
}
@aaronroberson
aaronroberson / add-cart-button.html
Last active August 29, 2015 14:02
Geekwise Day 9 Assets
<button type="button" class="btn btn-primary" ng-click="addItem(product)">Add to cart</button>