View WebKit.js
1 2 3 4 5 6 7 8
// WebKit
window.matchMedia('(min-width: ' + document.width + 'px)').matches // true
 
// Every other browser engine
window.matchMedia('(min-width: ' + document.width + 'px)').matches // false
 
// Somewhat outdated explanation
// http://www.sitepoint.com/rwd-scrollbars-is-chrome-better/
View _icon.css.scss
1 2 3 4
// Position icon background image
@mixin icon($index, $y: 0, $width: 80px) {
background-position: #{($index * -$width)} $y;
}
View bash
1 2 3 4 5 6 7 8 9 10
# colorize
export CLICOLOR=1
#export LSCOLORS=exfxCxDxbxegedabagacad
 
DIR=ex
SYM_LINK=fx
SOCKET=Cx
PIPE=Dx
EXE=cx
BLOCK_SP=eg
View cs-pattern-library.md

Centresource Pattern Library Guide

Below are elements that are expected to be in a Photoshop pattern library file.

Typography

  • Headers (h1 - h5)
  • Paragraphs
  • Lead Copy
  • Unordered List
View gist:5208401
1 2 3 4
UPDATE wp_options SET option_value = replace(option_value, '${1:OLD_SITE_URL}', '${2:NEW_SITE_URL}') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, '$1','$2');
UPDATE wp_posts SET post_content = replace(post_content, '$1', '$2');
UPDATE wp_postmeta SET meta_value = replace(meta_value, '$1', '$2');
View spin-jquery.js
1 2 3 4 5 6 7 8 9 10
jQuery.fn.spin = (opts) ->
if opts != false
opts =
className: 'js-spinner'
lines: 13
length: 5
width: 3
radius: 7
speed: 1.2
trail: 50
Something went wrong with that request. Please try again.