Code examples from this stack overflow answer.
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
| cd ~ | |
| wget https://nodejs.org/dist/latest-v4.x/node-v4.2.4-linux-x86.tar.gz | |
| mkdir temp | |
| tar xvf node-v*.tar.gz -C ./temp | |
| rm -rf node-v* | |
| cd temp | |
| mv node-v* node |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Relux Join</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.12.2/react.js"></script> | |
| <script src="https://rawgit.com/spoike/refluxjs/master/dist/reflux.js"></script> | |
| </head> | |
| <body> | |
| <div id="example"></div> |
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
| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |
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
| for (var i = 0; i < 1024 * 1024; i++) { | |
| process.nextTick(function () { Math.sqrt(i) } ) | |
| } |
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
| #!/bin/sh | |
| set -e | |
| set -x | |
| for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
| do | |
| npm -g install "$package" | |
| done |
Version recreated in one DIV
To modify the animation, change either @primaryClr or @ballSize for a different color and a different size.
Forked from Tim Guo's Pen Pacman loading animation.
A Pen by Iddar Olivares on CodePen.
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
| // require() some stuff from npm (like you were using browserify) | |
| // and then hit Run Code to run it on the right | |
| var axios = require('axios') | |
| axios.get('http://api-m2x.att.com/v2/devices/f816f8513a16d9bd7e38ae2ec87e6e77/streams/edison/values') | |
| .then(function (response) { | |
| console.log(response); | |
| }) | |
| .catch(function (response) { | |
| console.log(response); |
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
| // @license http://opensource.org/licenses/MIT | |
| // copyright Paul Irish 2015 | |
| // Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill | |
| // github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js | |
| // as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values | |
| // if you want values similar to what you'd get with real perf.now, place this towards the head of the page | |
| // but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser