- Use UTF-8. It’s 21 century, 8bit encodings dead now.
- Use 2 space indent, not tabs
- Use Unix-style line endings
- Keep lines not longer than 80 chars
- Remove trailing whitespace
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains 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
var amqp = require('amqplib/callback_api'); | |
// if the connection is closed or fails to be established at all, we will reconnect | |
var amqpConn = null; | |
function start() { | |
amqp.connect(process.env.CLOUDAMQP_URL + "?heartbeat=60", function(err, conn) { | |
if (err) { | |
console.error("[AMQP]", err.message); | |
return setTimeout(start, 1000); | |
} |
This file contains 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
package com.earthlinktele.faisaljamil.cinemana.push_notification; | |
import android.app.Notification; | |
import android.app.Notification.Builder; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.app.Service; | |
import android.content.Context; | |
import android.content.Intent; |
This file contains 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
NodeJS Chaincode Deploy and Test | |
start Docker | |
cd /fabric-samples/basic-network /basic network | |
Edit docker-compose.yml change line no 72 comment and 73 uncomment. //prod to devp network | |
Edit start.sh add ‘cli’ in 15 no. line (docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb cli) | |
./start.sh //run start script to up network | |
docker logs -f peer0.org1.example.com //log (1 terminal) | |
docker exec -it cli bash //peer (2 terminal) | |
cd /fabric-samples/chaincode/hyperledger/fabric/peer/nodefiles (3 terminal) |