The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
| var Storage = function (type) { | |
| function createCookie(name, value, days) { | |
| var date, expires; | |
| if (days) { | |
| date = new Date(); | |
| date.setTime(date.getTime()+(days*24*60*60*1000)); | |
| expires = "; expires="+date.toGMTString(); |
| // REQUIRES: | |
| // moment.js - https://github.com/moment/momentjs.com | |
| // USAGE: | |
| // {{ someDate | moment: [any moment function] : [param1] : [param2] : [param n] | |
| // EXAMPLES: | |
| // {{ someDate | moment: 'format': 'MMM DD, YYYY' }} | |
| // {{ someDate | moment: 'fromNow' }} |
| require 'fileutils' | |
| # An OS X System Service for quickly filing image files to a Jekyll blog folder, | |
| # putting Markdown links to the files on the clipboard. | |
| # Copyright Brett Terpstra 2013 | |
| # Config | |
| # ====== | |
| # Where to store the images | |
| base_path = '~/Sites/dev/octopress/source/uploads/' |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>Single-Column Responsive Email Template</title> | |
| <style> | |
| @media only screen and (min-device-width: 541px) { | |
| .content { |
| <?php | |
| // Note: The user-provided callback name must be filtered to prevent attack | |
| // vectors. This script simply removes any symbols other than `[a-zA-Z0-9$_]` | |
| // from the input. Sadly, this blocks the use of some valid JavaScript | |
| // identifiers, and also accepts a few invalid ones. See | |
| // http://mathiasbynens.be/notes/javascript-identifiers for details. | |
| $callback = isset($_GET['callback']) | |
| ? preg_replace('/[^a-zA-Z0-9$_.]/s', '', $_GET['callback']) | |
| : false; |