Skip to content

Instantly share code, notes, and snippets.

<link rel="shortcut icon" sizes="16x16 24x24 32x32 48x48 64x64" href="https://scotch.io/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="/wp-content/themes/thirty/img/icons/favicon-57.png">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/wp-content/themes/thirty/img/icons/favicon-57.png">
<link rel="apple-touch-icon" sizes="72x72" href="/wp-content/themes/thirty/img/icons/favicon-72.png">
<link rel="apple-touch-icon" sizes="114x114" href="/wp-content/themes/thirty/img/icons/favicon-114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/wp-content/themes/thirty/img/icons/favicon-120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/wp-content/themes/thirty/img/icons/favicon-144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/wp-content/themes/thirty/img/icons/favicon-152.png">
<meta name="application-name" content="Scotch Scotch scotch">
<meta name="msapplication-TileImage" content="/wp-content/themes/thirty/img/icons/favicon-144.png">
@ethyde
ethyde / JsFormat.sublime-settings.jsbeautifyrc
Last active August 29, 2015 14:21
js-beautify-full-options.jsbeautifyrc
{
// exposed jsbeautifier options
"indent_size": 4,
"indent_char": " ",
"eol": "\n",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"jslint_happy": false,
var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
{
"disallowCommaBeforeLineBreak": null,
"disallowDanglingUnderscores": true,
"disallowEmptyBlocks": true,
"disallowImplicitTypeConversion": [ "string" ],
"disallowKeywordsOnNewLine": [ "else" ],
"disallowKeywords": [ "with" ],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
@ethyde
ethyde / csscomb.json
Last active May 20, 2019 16:34
CSS Comb Config conforme idiomatic CSS
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
"quotes": "single",
/**
* Resize arbitary width x height region to fit inside another region.
*
* Conserve aspect ratio of the orignal region. Useful when shrinking/enlarging
* images to fit into a certain area.
*
* @param {Number} srcWidth Source area width
*
* @param {Number} srcHeight Source area height
*
// "1" or "unspecified"
if(navigator.doNotTrack == 1) {
// Do (or don't do) stuff.
}
@ethyde
ethyde / detect-bandwidth-dpi.js
Created December 19, 2014 12:04
Detection de la bande passante et de la densité de pixel pour charger la bonne images. http://mydevice.io/detect/
// detect.js by @goetter and Alsacreations
// config variables
var delay = 2000, // DOM load breakpoint in millisecond
pxratio = 2, // pixel-ratio breakpoint
name = "detect", // className to select
smallImg = "small", // prefix or suffix for small img (ex: "small" for "/small/pic.png")
bigImg = "big"; // prefix or suffix for big img (ex: "big" for "/big/pic.png")
if (window.addEventListener) {
@ethyde
ethyde / Gruntfile.js
Created December 10, 2014 16:29
Config grunt-webfont task under Windows O.S.
module.exports = function(grunt) {
'use strict';
// load all grunt-* task listed in package.json in one line.
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),