#!/usr/bin/env bash
cd ~/eos/contracts/user_contract
eosio-cpp -o user_contract.wasm user_contract.cpp --abigen
cd ~/eos/contracts/marketplace
eosio-cpp -o marketplace.wasm marketplace.cpp --abigen
cd ~
cleos wallet unlock --password PW5HrBPdJkwuSxXmUMMCofPsouiTJGwq9swJsp5Psdvxvv5YvC8QB
cleos create account eosio eosio.msig __PUBLIC_KEY__ __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
CREATE TABLE test | |
( | |
id INTEGER, | |
parent INTEGER | |
); | |
INSERT INTO test (id, parent) VALUES | |
(1, NULL), | |
(2, 1), |
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 base64Encode(data){ | |
return Buffer.from(data.toString()).toString('base64'); | |
} | |
function base64Decode(data){ | |
return Buffer.from(data, 'base64').toString('ascii'); | |
} | |
module.exports = { | |
base64Encode, |
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
String.prototype.toCapitalize = function () { | |
let arr = this.toLowerCase().split(" "); | |
arr.forEach((item, index) => { | |
arr[index] = item[0].toUpperCase() + item.substr(1); | |
}); | |
return arr.join(" "); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Image to Base64</title> | |
</head> | |
<body> | |
<style> | |
body { |