start new:
tmux
start new with session name:
tmux new -s myname
| // http://compass-style.org/reference/compass/helpers/sprites/ | |
| @mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true) { | |
| //http://compass-style.org/reference/compass/helpers/sprites/#sprite-file | |
| $sprite-image: sprite-file($map, $sprite); | |
| // http://compass-style.org/reference/compass/helpers/sprites/#sprite-url | |
| $sprite-map: sprite-url($map); | |
| // http://compass-style.org/reference/compass/helpers/sprites/#sprite-position |
| /* | |
| * _mixins.scss | |
| */ | |
| $font_dir: '../fonts/'; | |
| /* _simple-font-url('Chunkfive', 'eot'); */ | |
| @function _simple-font-url($name, $extension) | |
| { | |
| @return url($font_dir + $name + '-webfont.' + $extension); |
Getting Ruby, SASS and DocPad working on Heroku involves two steps:
Ensuring all your plugins are the latest version. Open up your package.json and change all your docpad plugin dependency versions to 2.x and your docpad version to 6.x. Once done, run rm -Rf node_modules; npm install to grab the latest versions of everything.
Installing Ruby and SASS on Heroku. Copy over the Gemfile, Gemfile.lock, and the .buildpacks files from https://github.com/docpad/sass-heroku-test to your own website. Then run heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git to tell heroku to use multiple buildpacks. Once done, deploy to heroku via git push heroku master and you may need to run heroku restart as sometimes the initial deploy fails.
| (function() { | |
| var CSSCriticalPath = function(w, d, opts) { | |
| var opt = opts || {}; | |
| var css = {}; | |
| var pushCSS = function(r) { | |
| if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
| var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
| for(var i = 0; i < styles.length; i++) { | |
| if(!!styles[i] === false) continue; | |
| var pair = styles[i].split(": "); |
| // Adapted from the awesome zurb foundation | |
| // https://github.com/zurb/foundation/blob/v5.2.0/scss/foundation/components/_block-grid.scss | |
| // | |
| // Block Grid Mixins | |
| // | |
| // We use this to control the maximum number of block grid elements per row | |
| $block-grid-elements: 12 !default; |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
| //events - a super-basic Javascript (publish subscribe) pattern | |
| var events = { | |
| events: {}, | |
| on: function (eventName, fn) { | |
| this.events[eventName] = this.events[eventName] || []; | |
| this.events[eventName].push(fn); | |
| }, | |
| off: function(eventName, fn) { | |
| if (this.events[eventName]) { |