import pdb; pdb.set_trace()
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.0; | |
contract OrderBookLUXBTC { | |
enum OrderType { BUY, SELL } | |
event OrderPlaced(uint64 id,OrderType t, uint64 price, uint64 quantity); | |
event OrderMatched(uint64 id); | |
mapping(address => uint) deposits; |
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
function Set(list) | |
local set = {} | |
for _, l in ipairs(list) | |
do set[l] = true end | |
return set | |
end | |
trash = Set { | |
"minecraft:dirt", | |
"minecraft:cobblestone" |
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
OrderId COrder::ComputeId() | |
{ | |
if (cachedOrderId == 0) { | |
std::vector<unsigned char> vchId; | |
vchId.resize(256); | |
auto it = vchId.begin(); | |
*it = base == "LUX" ? 0 : 1; | |
it++; |
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 | |
# Setup: | |
# sudo apt-get install python3-pip python3-setuputils | |
# sudo pip3 install --upgrade pip | |
# sudo pip3 install telegram-send | |
# telegram-send --configure | |
# Follow instuctions to create bot | |
# Place this file to $HOME(now it is /home/luxadmin) and replace IP var with your this masternode address | |
# crontab -e |
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.10; | |
contract StringHolder { | |
string savedString; | |
function setString( string newString ) public { | |
savedString = newString; | |
} | |
function getString() public constant returns( string ) { |
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
# discovery | |
snmpget -v2c -c public 172.17.0.2 1.3.6.1.2.1.1.5.0 1.3.6.1.2.1.1.2.0 | |
docker run -it -v /home/xotonic/docker-snmpd:/conf polinux/snmpd -V -Lo -c /conf/snmpd.conf | |
# snmpd.conf | |
exec 1.3.6.1.2.1.1.5.0 sysName /bin/echo "dockjer" |
User for mongobackup
and mongorestore
in 2.4
rs1:PRIMARY> db.addUser({ user: "pcrfems", pwd: "123", roles: [ 'read', 'userAdmin']})
{
"user" : "pcrfems",
"pwd" : "cd4ccf44c3f7fe667fc05ae38396a94b",
"roles" : [
"readWrite",
"userAdmin"
NewerOlder