sudo su
yum install wget -y
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* app/controllers/index.js */ | |
module.exports.index = function(req, res) { | |
res.render('index.html'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl genrsa 2048 > host.key | |
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert | |
#[enter *.localhost.dev for the Common Name] | |
openssl x509 -noout -fingerprint -text < host.cert > host.info | |
cat host.cert host.key > host.pem | |
Trust cert | |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain host.cert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
EXAMPLE USAGE | |
parentColl = new Backbone.Collection.Extended() | |
# by Array | |
subCollA = parentColl.sub( [ 1, 2, 3 ] ) | |
# or by Object | |
subCollO = parentColl.sub( { name: "Foo", age: 42 } ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Middleware | |
constructor: -> | |
# define a shared object witch will be routed through all called methods | |
shared = {} | |
# run the middleware method to process all defined methods | |
# If one method fails by calling error the queue will be stopped | |
@middleware shared, @simpleCall, @addSomeMethods, ( err, shared )=> | |
if err |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Highcharts.Chart.prototype.callbacks.push(function(chart) { | |
var hasTouch = hasTouch = document.documentElement.ontouchstart !== undefined, | |
mouseTracker = chart.tracker, | |
container = chart.container, | |
mouseMove; | |
mouseMove = function (e) { | |
// let the system handle multitouch operations like two finger scroll | |
// and pinching | |
if (e && e.touches && e.touches.length > 1) { |