README is empty
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
const fetchMachine = Machine({ | |
id: 'connection', | |
initial: 'disconnected', | |
context: { | |
mode: 0 | |
}, | |
states: { | |
disconnected: { |
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
### Keybase proof | |
I hereby claim: | |
* I am faisal00813 on github. | |
* I am faisal00813 (https://keybase.io/faisal00813) on keybase. | |
* I have a public key ASD2NKIOMFWJ3B9K_NMQmUuXg0BREpV7AwRur1TbO12jqgo | |
To claim this, I am signing this object: |
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
class Rocksdb < Formula | |
desc "Embeddable, persistent key-value store for fast storage" | |
homepage "https://rocksdb.org/" | |
url "https://github.com/facebook/rocksdb/archive/rocksdb-5.8.8.tar.gz" | |
sha256 "51adb8e265c19a22281598157b097105ea187589070baaf7ac714a649c423070" | |
bottle do | |
cellar :any | |
sha256 "df69fa36b2b025f62cc0d30da46e072512d424cc66c242834fcfba7a60cb913c" => :mojave | |
sha256 "b4dd4f1c3324876dcf7a9524d6440a0891f162db3c19b97284100aa4b13cabbe" => :high_sierra |
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
const request = require('request') | |
const msgpack = require("msgpack-lite"); | |
var packedData = msgpack.encode({ | |
"str" : "Something", | |
"number" : 4.0, | |
"arr": ["one","two"], | |
"nClass": { | |
"doubleNumber" : 35.0, | |
"nums" : [34,23] |
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
pathPrefix("user") { | |
path("msgPackTest") { | |
post { | |
extractRequest { | |
req => | |
println(req.headers) | |
req.entity match { | |
case strict: HttpEntity.Strict => | |
val resp = req.entity.dataBytes.runFold(ByteString.empty) { case (acc, b) => acc ++ b } | |
.map(x=> processMsgPackMsg(x.compact.toArray[Byte])) |
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
source `which virtualenvwrapper.sh` | |
cd ~ | |
rm Node* | |
workon latest-sovrin-master | |
nohup start_sovrin_node Node1 9701 9702 > Node1.log & | |
sleep 5 | |
nohup start_sovrin_node Node2 9703 9704 > Node2.log & | |
sleep 5 | |
nohup start_sovrin_node Node3 9705 9706 > Node3.log & | |
sleep 5 |
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
import thunk from 'redux-thunk'; | |
import expect from 'expect'; | |
describe('actions test', () => { | |
beforeAll(() => { | |
// do something here which you want to be executed before first test runs | |
} | |
it('editor.newPatient() should create a new patient', (done) => { |
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
db['your-collection'].find().forEach(function (doc){ | |
d = doc._id.getTimestamp(); | |
doc.visitedOn = d; | |
db['your-collection'].update({"_id":doc._id},doc,{upsert:true}); | |
print(d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds()) }) |
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
/**code taken from http://stackoverflow.com/a/4051500/845019 | |
* substitutes the string with #{variableName} format | |
*/ | |
implicit def RichFormatter(string: String) = new { | |
def richFormat(replacement: Map[String, Any]) = | |
(string /: replacement) { (res, entry) => res.replaceAll("#\\{%s\\}".format(entry._1), entry._2.toString) } | |
} |
NewerOlder