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
| require "try-catch" | |
| try { | |
| function() | |
| error('oops') | |
| end, | |
| catch { | |
| function(error) | |
| print('caught error: ' .. error) |
| var React = require( 'react') | |
| var Reflux =require('reflux') | |
| var TimeActions = Reflux.createActions(['tick']) | |
| var TimeStore = Reflux.createStore({ | |
| listenables: [TimeActions], | |
| onTick: function(tick) { | |
| this.trigger(tick); |
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
| // @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 |
| // 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); |
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.
| #!/bin/sh | |
| set -e | |
| set -x | |
| for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
| do | |
| npm -g install "$package" | |
| done |
| for (var i = 0; i < 1024 * 1024; i++) { | |
| process.nextTick(function () { Math.sqrt(i) } ) | |
| } |
| # 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 |
Code examples from this stack overflow answer.