Skip to content

Instantly share code, notes, and snippets.

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>
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: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();
steve228uk / SRCopyableLabel.swift
Last active February 26, 2022 21:08
Copyable UILabel
View SRCopyableLabel.swift
// SRCopyableLabel.swift
// Created by Stephen Radford on 08/09/2015.
// Copyright (c) 2015 Cocoon Development Ltd. All rights reserved.
import UIKit
class SRCopyableLabel: UILabel {
steve228uk / example.html
Last active February 24, 2023 17:40
Deeplink Youtube
View example.html
<!DOCTYPE html>
<meta charset="utf-8">
<script type="text/javascript">
window.onload = function() {
steve228uk / gist:1fc2a1fe475e3f3a7ee9
Created October 16, 2015 11:14
Transparent tvOS modal
View gist:1fc2a1fe475e3f3a7ee9
providesPresentationContextTransitionStyle = true
definesPresentationContext = true
modalVc.modalPresentationStyle = .OverCurrentContext
presentViewController(modalVc, animated: true, completion: nil)
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;