Lovingly skimmed from this guide
- Find your local host name, and hang onto it for later use
$ hostname- Create a self-signed SSL cert:
openssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 -nodes \| productive: | |
| tmux new-window -n refreshements 'cd adventurer; guard'; \ | |
| tmux split-window -t :2 'cd adventurer; supervisor server.js'; \ | |
| tmux select-window -t :1; \ | |
| tmux send-keys 'vi server.js' C-m; |
| #! /bin/bash | |
| function usage { | |
| echo "Usage: $0 /path/to/file" | |
| [[ -n $1 ]] && echo $1 | |
| exit 1 | |
| } | |
| # Only run if we have a single image file | |
| [[ $# != 1 ]] && usage |
Lovingly skimmed from this guide
$ hostnameopenssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 -nodes \| BM-PSweeney ~/Sites $ for i in js *mint; do in_folder $i git_message; done | |
| js (20121001d_release) [no ticket] - Removing debug statement | |
| beautymint (20121001b_release) Merge pull request #73 from beachmint/feature/1890/groupTracking | |
| homemint (20121001c_release) Bumping platform to work around [BM-2297] | |
| intimint (20121001d_release) Bumping platform to work around [BM-2297] | |
| jewelmint (20121001c_release) Bumping platform to work around [BM-2297] | |
| shoemint (20121001e_release) Bumping platform to work around [BM-2297] | |
| stylemint (20121001d_release) Bumping platform to work around [BM-2297] | |
| BM-PSweeney ~/Sites $ for i in stylemint homemint shoemint; do in_folder $i git_message; done |
| function pairs(value, key) { | |
| return [value, key] | |
| } | |
| function nonZero(array) { | |
| return array[0] !== 0 | |
| } | |
| function relativeTime(item, index, list) { | |
| var time = item[0] |
| {exec} = require 'child_process' | |
| target = | |
| repo: 'platform' | |
| branch: 'refs/heads/master' | |
| update = -> | |
| exec 'npm install && git pull', (err, stdout, stderr) -> | |
| if err then console.error "Could not update application:", err | |
| process.exit(0) |
| var console = require(__dirname + '/logger') | |
| // All three of these do the same thing | |
| console.log(1, 2, 3) // Gets rewritten as console.log('info', 1, 2, 3) | |
| console.log('info', 1, 2, 3) // Indentical as below | |
| console.info(1, 2, 3) | |
| // Works as well | |
| console.warn('oh noes') | |
| console.error('oh poop!') |
What does this do?
node pruneCss.js styles.css output > strippedFile.cssUse Chrome's audit panel to get a list of unused CSS selectors on the current page, and, presuming your CSS file conforms to the style of "[selector] {all; rules; one: one-line;}" this script will print out the CSS file, omitting the unused selectors.