Skip to content

Instantly share code, notes, and snippets.

View MattFriedman's full-sized avatar

Matt Friedman MattFriedman

View GitHub Profile
@MattFriedman
MattFriedman / Merge Sort in Swift (IOS)
Last active August 29, 2015 14:17
This is a simple merge sort without optimizations written in the new Swift language for IOS
func mergeSort(arr: [Int]) -> [Int]{
func merge(left: [Int], right: [Int]) -> [Int] {
var m = 0
var merged : [Int] = []
var i = 0, j=0
while i < left.count && j < right.count {
@MattFriedman
MattFriedman / topcoat-icon-directive.js
Last active January 2, 2016 05:19
A topcoat-icon angular directive. (relying on Modernizr and the topcoat IcomaticUtils file)
'use strict';
/**
* Usage: <span topcoat-icon="alert"></span>
*/
angular.module('listoutfitterApp').directive('topcoatIcon', function () {
var fontfaceSupported = Modernizr.fontface;
// don't use the IcomaticUtils fallback data structure.
// For performance use a lookup hash instead.
@MattFriedman
MattFriedman / knockout_accordion.html
Created January 30, 2013 03:35
Simple Knockout JQuery Accordion
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.2.1/knockout-min.js" type="text/javascript"></script>
<style type="text/css">
#menu {
width: 400px;
cursor: pointer;