Skip to content

Instantly share code, notes, and snippets.

Phil Ricketts replete

Block or report user

Report or block replete

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@replete
replete / osx_ramdisk.sh
Created Dec 2, 2015 — forked from jnschulze/osx_ramdisk.sh
Move Chrome, Safari and iTunes Cache to Ramdisk.
View osx_ramdisk.sh
#!/bin/bash
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
CACHEDIR="/Volumes/RamDiskCache/$USER"
@replete
replete / AutoHotkey_BrowserGestures_SwipeLeftRight.ahk
Created Apr 6, 2017
AutoHotkey - Browser Gestures (Swipe left/right navigate back/forward, middle-click like firefox)
View AutoHotkey_BrowserGestures_SwipeLeftRight.ahk
GroupAdd, Browsers, ahk_class Chrome_WidgetWin_1
GroupAdd, Browsers, ahk_class MozillaWindowClass
GroupAdd, Browsers, ahk_class ApplicationFrameWindow
#MaxHotkeysPerInterval 219
;-----three finger tap for middle click-----
+^#F22::
SendInput, {MButton}
return
@replete
replete / _lt-ie9-foundation-grid.scss
Last active May 26, 2017
Foundation Zurb Grid 4/5 in IE7 & IE8.
View _lt-ie9-foundation-grid.scss
@charset "UTF-8";
/*---------------------------------------------------------------
IE78 - Zurb Foundation 4 Grid
ˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍ
https://gist.github.com/replete/7082477
(an enhanced fork of https://gist.github.com/zurbchris/5068210 )
1) Make sure $row-width-px = your max large breakpoint row width (e.g. 960px)
@replete
replete / validators.blacklisted-characters.directive.js
Created Apr 18, 2017
Angular 1.x blacklisted characters (not allowed) validator.
View validators.blacklisted-characters.directive.js
(function() {
'use strict';
angular.module('shopperTrak.validators')
.directive('blacklistedCharacters', function (){
return {
require: 'ngModel',
restrict:'A',
link: function(scope, elem, attrs, ngModel) {
@replete
replete / validators.blacklisted-values.directive.js
Created Apr 18, 2017
Angular 1.x blacklisted values validator. Accepts a list of values that are not allowed.
View validators.blacklisted-values.directive.js
(function() {
'use strict';
angular.module('shopperTrak.validators')
.directive('blacklistedValues', function (){
return {
require: 'ngModel',
restrict:'A',
link: function(scope, elem, attr, ngModel) {
@replete
replete / initBrowserSupport.js
Created Mar 14, 2017
Browser support- alternative to modernizr
View initBrowserSupport.js
// Browser support
(function (d, h, w, n) {
//function hasProperties(properties, tagName) {
// var isStyle = !!!tagName;
// tagName = tagName || 'div';
// var el = d.createElement(tagName);
// for (var prop in properties) {
// if ((isStyle ? el.style[properties[prop]] : el[properties[prop]]) !== undefined ) {
// return true;
View replete.select.js
(function (w, d, undefined) {
'use strict';
// TODO: Make some methods private for better inheritance
var h = d.documentElement;
function getNamespace(ns, names) {
for (var i = 0, n = names.split('.'), l = n.length; i < l; i++) {
View Dockerfile
FROM debian:latest
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune
View _mediaQueries.scss
/*---------------------------------------------------------------
Media Queries
ˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍˍ
Mixins
˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭˭*/
//Default values
$MEDIUM_MIN: 740px !default;
$LARGE_MIN: 1134px !default;
$XLARGE_MIN: 1440px !default;
@replete
replete / hashSafePropertyName.js
Created Jan 5, 2017
'Hash' safe property name. Take an object and represent it as a 'safe' javascript property string, for purposes of memoization.
View hashSafePropertyName.js
/**
* @param {Object|string} input - The string or object to flatten into a hash key string
* @returns {string} - a string representing the object as a unique string.
* @example hashSafePropertyName({a:200,b:500,c:[300,200,'eggs']}); // 'a$200_b$500_c$__300_200_eggs__'
*/
function hashSafePropertyName(input) {
var isString = _.isString(input);
var isObject = _.isObject(input) && !_.isEmpty(input) && _.isArray(input);
if (!isString && !isObject) {
You can’t perform that action at this time.