Skip to content

Instantly share code, notes, and snippets.

View gist:5a8401f766f2673f9bff
.factory('ourFactory', function($http, $q){
return {
update: function(){
var defer = $q.defer(); // we're gonna create a new promise to return
d.resolve(data); // This is what we can access from our promise later
return d.promise; // return the promise
View gist:25e909f4b2208371846b
git config branch.YOURBRANCHHERE.mergeoptions "--no-ff"
View gist:9c42bc206a26614b4c91
filter('clean', function(){
return function(input){
return input.replace(/&/g, 'and').replace(/[^a-zA-Z0-9 -]+/g, '').replace(/\s+/g, '-').toLowerCase();
View index.php
<!DOCTYPE html>
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="abstract" content="Personal and professional portfolio of Kevin Steinhardt">
<meta name="author" content="Kevin Steinhardt">
<meta name="copyright" content="Creative Commons Attribution 3.0">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Kevin Steinhardt</title>
View gist:5a8dc8bb00e99688c0ec
(function(angular) {
'use strict';
angular.module('store', ['ngRoute'])
.controller('MainController', ['$scope','$route','$routeParams','$location', function($scope, $route, $routeParams, $location) {
$scope.$route = $route;
$scope.$location = $location;
$scope.$routeParams = $routeParams;
View gist:eaf5a4698ee985a814cc
<label ng-repeat="material in materials" class="materials col-lg-8 col-lg-offset-2 debug" style="border-right: 1px solid black;">
<div class="inner">
<input type="checkbox" ng-model="materials" ng-click="select(item)" checklist-model="choices.materials" checklist-value="material">
<i class="icon-{{material | lowercase}}" ng-class="{class: materials}"></i> {{material | capitalize}}
steve228uk / validator.js
Created April 23, 2013 23:03
JS Validate script
View validator.js
'use strict';
var sr = {};
sr.Validator = function(){
this.errors = [];
this.messages = {
required: 'The :input: is required',
email: 'The :input: is not a valid email address',
View gist:532766de1d414608cb8b
{"jolts": [{"Date": "1/6/2016", "Question": "Today I'm working on...", "Response": "Today I'm working on "}, {"Date": "1/6/2016", "Question": "Who's your favorite writer?", "Response": "My favorite writer is "}, {"Date": "1/6/2016", "Question": "What are you saving up for?", "Response": "I'm saving up for "}, {"Date": "1/7/2016", "Question": "Name a few of your favorite things.", "Response": "These are a few of my favorite things:"}, {"Date": "1/7/2016", "Question": "A screenshot of a text exchange. ", "Response": "A recent text exchange:"}, {"Date": "1/7/2016", "Question": "What's the best class you've ever taken?", "Response": "The best class I've ever taken was"}, {"Date": "1/8/2016", "Question": "What talent do you wish you had?", "Response": "I've always wanted to be talented at"}, {"Date": "1/8/2016", "Question": "What's the weirdest thing you've ever eaten?", "Response": "The weirdest thing I've eaten is "}, {"Date": "1/8/2016", "Question": "Paste whatever's in your clipboard right now.", "Response": "
steve228uk / GIFPlayer.h
Created January 28, 2016 23:16
GIFPlayer for OSX by the guys at Byte Inc.
View GIFPlayer.h
// GIFPlayer.h
// Byte
// Created by Dom Hofmann on 8/9/15.
// Copyright © 2015 Byte, Inc. All rights reserved.
#import "ByteObject.h"
#import <Cocoa/Cocoa.h>