npm install -g browser-sync
browser-sync start --server --files ".html, css/.css, js/*.js"
will serve the current directory at http://localhost:3000 with live reloading enabled for a basic html dev
| To list any process listening to the port 8080: | |
| lsof -i:8080 | |
| To kill any process listening to the port 8080: | |
| kill $(lsof -t -i:8080) | |
| or more violently: | |
| kill -9 $(lsof -t -i:8080) |
| # Find the latest version on https://github.com/creationix/nvm#install-script | |
| $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
| # Add in your ~/.zshrc the following: | |
| export NVM_DIR=~/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
| $ source ~/.zshrc |
| "Print to console": { | |
| "prefix": "log", | |
| "body": [ | |
| "console.log('$1', $1);", | |
| ], | |
| "description": "Log output to console" | |
| } |
| # Where is the location of your current shall. Useful if we need to revert | |
| echo $0 | |
| # Install ZSH | |
| sudo apt-get install zsh | |
| # Instal GIT | |
| sudo apt-get install git-core | |
| # Install OhMyZSH |
npm install -g browser-sync
browser-sync start --server --files ".html, css/.css, js/*.js"
will serve the current directory at http://localhost:3000 with live reloading enabled for a basic html dev
npm install -g browser-sync
browser-sync start --server --files ".html, css/.css, js/*.js"
will serve the current directory at http://localhost:3000 with live reloading enabled for a basic html dev
| 'use strict'; | |
| // Generated on 2014-04-14 using generator-leaflet 0.0.14 | |
| var gulp = require('gulp'); | |
| var open = require('open'); | |
| var wiredep = require('wiredep').stream; | |
| // Load plugins | |
| var $ = require('gulp-load-plugins')(); |
| Options +FollowSymLinks | |
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} ^example.com [NC] | |
| RewriteRule ^(.*)$ http://www.example.com [R=301,L] |
| body { | |
| -webkit-user-select: none; | |
| -moz-user-select: -moz-none; | |
| -ms-user-select: none; | |
| user-select: none; | |
| } | |
| $(document).on("contextmenu", function (event) { event.preventDefault(); }); |
| If you don't mind modifying your HTML a little to include the value attribute of the options, you can significantly reduce the code necessary to do this: | |
| <option>B</option> | |
| to | |
| <option value="B">B</option> | |
| This will be helpful when you want to do something like: | |
| <option value="IL">Illinois</option> |