Skip to content

Instantly share code, notes, and snippets.

@skydogch
skydogch / installJavaAndIntelliJ.sh
Created November 4, 2015 14:00 — forked from spences10/installJavaAndIntelliJ.sh
Shell script to Install Java and IntelliJ for Ubuntu
#!/bin/sh
# Sources:
# http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
# http://askubuntu.com/questions/272314/setup-and-install-intellij-with-jdk
# https://gist.github.com/tahl/1658401
# guide on setting up IntelliJ from Tony Owen
# http://droidapp.co.uk/2012/12/29/switching-to-intellij-installation-and-setup/
# I have amended for my own purposes please refer to considerations in the Ask Ubuntu post
@skydogch
skydogch / Data2Sql
Created October 17, 2015 21:10 — forked from romanman/Data2Sql
import org.ethereum.core.Block;
import org.ethereum.core.Genesis;
import org.ethereum.core.Transaction;
import org.ethereum.core.TransactionReceipt;
import org.ethereum.crypto.ECKey;
import org.ethereum.crypto.HashUtil;
import org.ethereum.facade.Ethereum;
import org.ethereum.facade.EthereumFactory;
import org.ethereum.listener.EthereumListenerAdapter;
import org.ethereum.net.p2p.HelloMessage;
private static byte[] decrypt(byte[] data, byte[] key)
{
// 16 bytes is the IV size for AES256
try
{
PaddedBufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESFastEngine()));
byte[] ivBytes = new byte[16];
System.arraycopy(data, 0, ivBytes, 0, ivBytes.length); // Get iv from data
byte[] dataonly = new byte[data.length - ivBytes.length];
System.arraycopy(data, ivBytes.length, dataonly, 0, data.length - ivBytes.length);
package test.ethereum.dht;
import org.ethereum.net.dht.Bucket;
import org.ethereum.net.dht.Peer;
import org.junit.Test;
import org.spongycastle.util.encoders.Hex;
import java.util.List;
import static org.ethereum.net.dht.DHTUtils.getAllLeafs;