(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| #! /bin/bash | |
| echo "-------------------------------------------" | |
| echo "-- Installing needed packages from repos --" | |
| echo "-------------------------------------------" | |
| sudo apt-get install -y git cmake libffi-dev libssl-dev build-essential libusb-1.0-0-dev pkg-config | |
| echo "------------------------------------------------" | |
| echo "-- Cloning rtl-sdr driver files from osmocom --" | |
| echo "------------------------------------------------" |
| /** | |
| * supplant() does variable substitution on the string. It scans through the string looking for | |
| * expressions enclosed in { } braces. If an expression is found, use it as a key on the object, | |
| * and if the key has a string value or number value, it is substituted for the bracket expression | |
| * and it repeats. | |
| * | |
| * Written by Douglas Crockford | |
| * http://www.crockford.com/ | |
| */ | |
| String.prototype.supplant = function (o) { |
| [ | |
| { | |
| "id": 9, | |
| "title": "Yesterday", | |
| "type": "song", | |
| "meta": { | |
| "url": "https://soundcloud.com/raulmatei/yesterday", | |
| "composer": "Beatles (Lennon–McCartney)", | |
| "composerDetails": "(trans. Stanley Yates)", | |
| "performer": "Raul Matei", |
| let Rx = require("rx"); | |
| Rx.Observable.fromSuperagent = request => () => Rx.Observable.create(observer => { | |
| request.end((err, res) => { | |
| if (err) { | |
| observer.onError(err) | |
| } else { | |
| observer.onNext(res); | |
| } | |
| observer.onCompleted(); |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |