Skip to content

Instantly share code, notes, and snippets.

Naveen nobodyme

View GitHub Profile
View web3-timeout-modified.js
public class ZookeeperNonceTransactionManager extends FastRawTransactionManager implements TransactionManager {
private static final byte ATTEMPTS = 20;
private static final int SLEEP_DURATION = 100;
private static volatile BigInteger nonce = BigInteger.valueOf(-1);
private final ZookeeperNonce zookeeperNonce;
private final TransactionReceiptProcessor transactionReceiptProcessor;
View quorum-deploy-send-tokens.js
function deployERC20(){
//var web3 = new Web3(new Web3.providers.HttpProvider('https://ropsten.infura.io/v3/99ba9cf51093478e8941ff667779149c'));
var web3 = new Web3(new Web3.providers.HttpProvider('https://api.giftz.exchange'));
// account = web3.eth.accounts.create("hello");
// address = account.address;
// privateKey = account.privateKey;
// console.log("address", address);
// console.log("privatekey",privateKey);
View signed-deployment.js
function deployERC20(){
var web3 = new Web3(new Web3.providers.HttpProvider('https://ropsten.infura.io/v3/99ba9cf51093478e8941ff667779149c'));
//var web3 = new Web3(new Web3.providers.HttpProvider('http://68.183.223.119:22002'));
// account = web3.eth.accounts.create("hello");
// address = account.address;
// privateKey = account.privateKey;
// console.log("address", address);
// console.log("privatekey",privateKey);
View ico.sol
pragma solidity ^0.4.24;
// Only Signatures of few methods used in the ERC20Token contract.
contract OurToken {
function balanceOf(address tokenOwner) public constant returns (uint balance);
// To release tokens to the address that have send ether.
function releaseTokens(address _receiver, uint _amount) public;
@nobodyme
nobodyme / web3_access.js
Last active Sep 4, 2018
account info, balance and transaction using metamask with web3.js
View web3_access.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ethjs@0.3.4/dist/ethjs.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.34/dist/web3.min.js"></script>
<title>Document</title>
</head>
View 5-pictures-sample-python.py
import requests
url = 'https://www.reddit.com/r/wallpapers.json'
response = requests.get(url)
if not response.ok:
print("Error", response.status_code)
exit()
data = response.json()['data']['children']
first_post = data[0]['data']
image_url = first_post['url']
if '.png' in image_url:
@nobodyme
nobodyme / 2-pictures-sample-python.py
Last active Jul 14, 2018
gist-2 medium first blog
View 2-pictures-sample-python.py
# array of posts in the page
data = response.json()['data']['children']
# get first post from array of posts
first_post = data[0]['data']
# get the image url of the first post
image_url = first_post['url']
@nobodyme
nobodyme / 1-pictures-reddit-sample.py
Created Jul 14, 2018
Gists to post in the medium article as it does not support syntax highlighting
View 1-pictures-reddit-sample.py
import requests
url = 'https://www.reddit.com/r/wallpapers.json'
response = requests.get(url)
if not response.ok:
print("Error", response.status_code)
exit()
data = response.json()
print(data)
View ico.txt
What an ICO should generally consist of?
- Introduction (problem)
- Solution
- Project description
- Token role, token dynamics, and ecosystem
- Use of funds
- Team
- Roadmap
- Legal disclaimers
View nobody-gedit-theme.xml
<?xml version="1.0" ?>
<style-scheme id="nobody" name="Nobody" version="1.0">
<author/>
<_description>nobody</_description>
<color name="white" value="#eeeeee"/>
<color name="yellow" value="#fce94f"/>
<color name="asfalto" value="#61635f"/>
<color name="carbon" value="#232323"/>
<color name="green" value="#b5d600"/>
You can’t perform that action at this time.