npm install --registry http://registry.npmjs.org packagename
This will update your .npmrc to include the following line registry = http://registry.npmjs.eu/
npm config set registry http://registry.npmjs.eu
| [...] | |
| typo3conf/ext/skin/ext_typoscript_setup_local.txt |
| $.getJSON('http://jsonip.com/?callback=', function(data){ | |
| console.log('Your ip is: ' + data.ip); | |
| }); |
| var colors = require('colors'); | |
| var exec = require('child_process').exec; | |
| exec('git rev-parse HEAD', function(error, stdout, stderr){ | |
| hash = process.argv[2] ? process.argv[2] : stdout | |
| hash = hash.toString(); | |
| hash = hash.split(''); | |
| var identicons = '', | |
| on = " ".zebra.inverse, | |
| off = " ".green.inverse, |
| styles = [ | |
| featureType: "poi", | |
| elementType: "labels", | |
| stylers: [ | |
| visibility: "off" | |
| ] | |
| ]; | |
| map = new google.maps.Map(document.getElementById('map-canvas'), { | |
| disableDefaultUI: true, |
| # Override the navigate method to plug Ganalytics to it | |
| originalLoadUrl = Backbone.History.prototype.loadUrl; | |
| # This cleans up fragment the same way that loadUrl does as of Backbone 0.5.3 | |
| Backbone.History.prototype.loadUrl = (fragmentOverride) -> | |
| fragment = this.fragment = this.getFragment(fragmentOverride) | |
| console.log fragment, window.ga | |
| if window.ga != undefined |
| Ruler = function (label, top, color, $container){ | |
| return $('<p class="ruler">'+label+'</p>').css({ | |
| "position": "absolute", | |
| "width": "100%", | |
| "margin": "0", | |
| "padding": "0", | |
| "border-top": "2px solid "+color, | |
| "top": top, | |
| "background": "rgba(255,255,255,.6)" | |
| }).appendTo($container); |
Source : Smashing Mag
| # Create local references to array methods we’ll want to use later. | |
| array = [] | |
| push = array.push | |
| slice = array.slice | |
| splice = array.splice | |
| # (Backbone.)Events : A module that can be mixed in to any object in order to provide it with custom events. You may bind with on or remove with off callback functions to an event; trigger-ing an event fires all callbacks in succession. | |
| class Events | |
| # Bind an event to a `callback` function. Passing `"all"` will bind |