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
var bitcore = require('bitcore'); | |
var assert = require('assert'); | |
var index = 1; | |
// Create a new HD private key. | |
var hdPrivateKey = new bitcore.HDPrivateKey(); //returns xpriv... | |
//Use private key to create drived public key. | |
var hdPublicKey = hdPrivateKey.hdPublicKey; | |
// Derive address from public key |
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/bash | |
#Force file syncronization and lock writes | |
mongo -u "username" -p "password" --authenticationDatabase "admin" --eval "printjson(db.fsyncLock())" | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
MONGO_HOST="127.0.0.1" #replace with your server ip | |
MONGO_PORT="27017" | |
MONGO_DATABASE="dbname" #replace with your database name |
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.4; | |
contract HelloWorld { | |
address public owner; | |
string public message; | |
function HelloWorld() { | |
owner = msg.sender; | |
message = 'Hello, world'; | |
} |
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.4; | |
import './Ownable.sol'; | |
contract EscrowContract is Ownable { | |
address public owner; | |
address public recipientAddress; | |
address public parent; | |
uint public escrowAmount; | |
EscrowStatuses public status = EscrowStatuses.Pending; | |
enum EscrowStatuses { Paid, Pending, Complete, Cancelled, Partial } |
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/bash | |
pm2 stop angular4 | |
. ~/.nvm/nvm.sh | |
nvm use 9.7.1 | |
npm install | |
pm2 start start.sh --name angular4 |
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
mongod --fork --dbpath /home/mongodata/mongodb --smallfiles --logpath /var/log/mongodb.log --logappend |
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
sudo du -xh / | grep -P "G\t" | |
df -Bg |
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
sudo su -s /bin/bash jenkins |
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
** start ** | |
mongod --fork --dbpath /home/mongodata/mongodb --smallfiles --logpath /var/log/mongodb.log --logappend --auth | |
** stop ** | |
sudo killall -15 mongod |
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
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |