Skip to content

Instantly share code, notes, and snippets.

Ady Liu adyliu

Block or report user

Report or block adyliu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adyliu
adyliu / rinkeby-peers-list.txt
Last active Aug 22, 2019
get the peers of rinkeby of ethereum
View rinkeby-peers-list.txt
> console.log(admin.peers.map(function(e){return 'admin.addPeer("enode://'+e.id+'@'+e.network.remoteAddress+'");'}).sort().join('\n'))
admin.addPeer("enode://0db812a93f04c5d255d6b49e2982d682de95fb4d627cb71b1ae09c95ccd142cbfd1e4d81de8f6abd53d7039f71d1b76791637550b8457ccb75ab84924a3427a6@35.170.185.206:30303");
admin.addPeer("enode://15512c6ddd95ade68b6825c464cd076f1ef1b9ccd6675fc6c1a64d9131980e0219fe616c8878a7e9d815df96b6635d90ee2a4ec3a14ec88d4e27839d912f9186@35.236.199.169:30303");
admin.addPeer("enode://1f6dcd2e10a93b7373fd17a715d1a337f73a2a6807a358d2ab0bf9c9a70e78997df4d32468fa1886a8158a947ab44998fa6ca34c53c543bb557024ada2e687eb@34.203.75.150:30303");
admin.addPeer("enode://22745f606bf7846714bb55f0a98437e2b09da1928647965ef511d908392c4110e0a7709c2cc1630b48ff074cf0d519ede1d1b124a4f88aa21b794ddc0e7052e3@34.219.84.192:18546");
admin.addPeer("enode://2ca86aaa816920575eca798a30ee657dcc593a5420c20d129f9008ffe5432e54901f4f0846bb9a88ccde5d8531f14f22528b2ea314386815531f98c51c7818ff@18.234.144.172:30303");
admin.addP
@adyliu
adyliu / OfflineEOSTransfer.java
Created Sep 28, 2018
sign transaction offline for eos transfer
View OfflineEOSTransfer.java
package eos.sample;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import org.apache.log4j.BasicConfigurator;
import io.jafka.jeos.EosApi;
import io.jafka.jeos.EosApiFactory;
@adyliu
adyliu / EosCreateKey.java
Created Sep 6, 2018
Create EOS Key with java without RPC
View EosCreateKey.java
package eos.sample;
import io.jafka.jeos.EosApiFactory;
import io.jafka.jeos.LocalApi;
public class EosCreateKey {
public static void main(String[] args) {
LocalApi api = EosApiFactory.createLocalApi();
String privateKey = api.createPrivateKey();
@adyliu
adyliu / TransferEOS.java
Created Sep 5, 2018
transfer EOS with java client
View TransferEOS.java
package eos.sample;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@adyliu
adyliu / CreateAccount.java
Last active Aug 25, 2019
create eos account with java
View CreateAccount.java
package eos.sample;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@adyliu
adyliu / AddressChecker.java
Created Aug 3, 2018
ethereum address checker
View AddressChecker.java
package demo;
import java.math.BigInteger;
import java.util.Arrays;
import org.web3j.crypto.Hash;
import org.web3j.utils.Numeric;
public class AddressChecker {
View FoMo3Dlong.sol
pragma solidity ^0.4.24;
//==============================================================================
// _ _ _ _|_ _ .
// (/_\/(/_| | | _\ .
//==============================================================================
contract F3Devents {
// fired whenever a player registers a name
event onNewName
View ForkJoinDemo.java
/**
*
*/
package demo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ForkJoinPool;
@adyliu
adyliu / Consumers.java
Created Jun 25, 2014
Simple Producers for jafka
View Consumers.java
import java.io.Closeable;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.shijiebang.xpower.configcenter.ConfigCenter;
import com.sohu.jafka.consumer.Consumer;
@adyliu
adyliu / build.sh
Created Nov 27, 2013
simple http hook for octopress blog hosted on github
View build.sh
#!/bin/bash
echo "build at `date`"
git pull
rake generate
You can’t perform that action at this time.