Skip to content

Instantly share code, notes, and snippets.

View mdarnall's full-sized avatar

Matt Darnall mdarnall

View GitHub Profile
@inamiy
inamiy / SwiftElmFrameworkList.md
Last active March 11, 2024 10:20
React & Elm inspired frameworks in Swift
//
// Signal+Extensions.swift
// Khan Academy
//
// Created by Nacho Soto on 10/1/15.
// Copyright © 2015 Khan Academy. All rights reserved.
//
import ReactiveCocoa
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@thomseddon
thomseddon / gist:3511330
Last active March 8, 2023 03:39
AngularJS byte format filter
app.filter('bytes', function() {
return function(bytes, precision) {
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-';
if (typeof precision === 'undefined') precision = 1;
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
number = Math.floor(Math.log(bytes) / Math.log(1024));
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
}
});
@Integralist
Integralist / README.md
Created March 27, 2012 08:58 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

Object-Oriented CSS

Below is how I am currently structuring my CSS to be more object-oriented (with a little assistence from Sass):

@star-szr
star-szr / Custom.css
Created September 27, 2011 17:45
IR_Black Theme (with sidebar and view-source colors) for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@DerAlbertCom
DerAlbertCom / GenericModelBinderProvider.cs
Created November 22, 2010 10:50
DependicyInjection in ModelBinder MVC 3
using System;
using System.Web.Mvc;
namespace NewInMVC3.ModelBinder
{
public class GenericModelBinderProvider : IModelBinderProvider
{
public IModelBinder GetBinder(Type modelType)
{
var genericType = typeof (IModelBinder<>).MakeGenericType(modelType);