Skip to content

Instantly share code, notes, and snippets.

View wesm87's full-sized avatar
:shipit:

Wes Moberly wesm87

:shipit:
  • Curative
  • Cincinnati, OH
View GitHub Profile
@rjhilgefort
rjhilgefort / class.js
Last active December 2, 2017 19:48
Class vs Factory
class ConsecutiveFailure {
constructor({
count = 0,
threshold = 10,
logger = console.log,
}) {
this.count = count;
this.threshold = threshold;
this.logger = logger;
}
@ScottDeLuzio
ScottDeLuzio / robots.txt
Created August 14, 2015 23:15
Robots.txt prevent access to WooCommerce add-to-cart links
User-agent: *
Disallow: /*add-to-cart=*
@davidhund
davidhund / pragmatic-touch-icons.md
Last active September 4, 2020 15:42
Pragmatic Touch Icons

NOTE I'm trying to find the most optimal fav/touch icon setup for my use-cases. Nothing new here. Read Mathias Bynens' articles on re-shortcut-icon and touch icons, a FAQ or a Cheat Sheet for all the details.

I'd like to hear how you approach this: @valuedstandards or comment on this gist.

The issue

You have to include a boatload of link elements pointing to many different images to provide (mobile) devices with a 'favicon' or 'touch icon':

![Touch Icon Links](https://o.twimg.com/2/proxy.jpg?t=HBj6AWh0dHBzOi8vcGhvdG9zLTYuZHJvcGJveC5jb20vdC8yL0FBRGFGY1VRN1dfSExnT3cwR1VhUmtaUWRFcWhxSDVGRjNMdXFfbHRJWG1GNFEvMTIvMjI3OTE2L3BuZy8xMDI0eDc2OC8yL18vMC80L1NjcmVlbnNob3QlMjAyMDE1LTA0LTE0JTIwMTYuNTYuMjYucG5nL0NNejBEU0FCSUFJZ0F5Z0JLQUkvNGR1eDZnMzZmYnlzYWI3

// Brightness math based on:
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx
$red-magic-number: 241;
$green-magic-number: 691;
$blue-magic-number: 68;
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number;
@function brightness($color) {
// Extract color components
@shuhei
shuhei / .gitignore
Last active April 25, 2023 09:05
An example `gulpfile.js` for CoffeeScript and Browserify. Note that this uses gulp-browserify's master. Update this as soon as 0.2.6 is out.
/node_modules
/build
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//