- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
| FEES_COLLECTED=$(lightning-cli getinfo | jq '.msatoshi_fees_collected / 1000') | |
| AVERAGE_FORWARDED=$(lightning-cli listforwards | jq '.forwards[] | select (.status == "settled") | .in_msatoshi' | jq -s 'add / length / 1000') | |
| PAYMENTS_FORWARDED=$(lightning-cli listforwards | jq '.forwards[] | select (.status == "settled") | .in_msatoshi' | jq -s 'length') | |
| echo "Payments forwarded: $PAYMENTS_FORWARDED" | |
| echo "Average payment forwarded: $AVERAGE_FORWARDED satoshi" | |
| echo "Fees collected: $FEES_COLLECTED satoshi" |
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
| pragma solidity ^0.4.7; | |
| contract CommitRevealElection { | |
| // The two choices for your vote | |
| string public choice1; | |
| string public choice2; | |
| // Information about the current status of the vote | |
| uint public votesForChoice1; | |
| uint public votesForChoice2; |
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
| ############################################################################ | |
| # # | |
| # ------- Useful Docker Aliases -------- # | |
| # # | |
| # # Installation : # | |
| # copy/paste these lines into your .bashrc or .zshrc file or just # | |
| # type the following in your current shell to try it out: # | |
| # wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash | |
| # # | |
| # # Usage: # |
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
| ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4 |
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
| const Promise = require('bluebird'); | |
| const list = [300, 500, 400] | |
| const getMapper = name => | |
| ms => Promise.delay(ms).then(() => console.log(`${name}: ${ms}ms done in ${Date.now() - start}`)); | |
| const start = Date.now(); | |
| Promise.map(list, getMapper('map, infinity concurrency')); |