Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -x
# fix time drift
boot2docker ssh sudo ntpclient -s -h pool.ntp.org
DOCKER_IP=$(boot2docker ip)
DOCKER_IMAGE=cppeth
DOCKER_NAME=moveth
@jorisbontje
jorisbontje / alethzero-version.sh
Created March 17, 2015 09:16
Show exact commit of installed AlethZero and Mist on OSX
#!/bin/sh
cd /Library/Caches/Homebrew/cpp-ethereum--git && git log --pretty=format:"%h" -1
@jorisbontje
jorisbontje / test_sha256.py
Created March 3, 2015 14:07
test_sha256.py
import bitcoin as b
from pyethereum import tester, utils
class TestSHA256(object):
CONTRACT = """
def func():
return(sha256([1,2], items=2))
"""
@jorisbontje
jorisbontje / test_ecrecover.py
Created March 2, 2015 07:22
test_ecrecover.py
import bitcoin as b
from pyethereum import tester, utils
class TestECRecover(object):
CONTRACT = """
def test_ecrecover(h, v, r, s):
return(ecrecover(h, v, r, s))
@jorisbontje
jorisbontje / inviteme.py
Created September 8, 2014 18:46
Tox InviteMe Bot
#!/usr/bin/env python
#
# @file echo.py
# @author Wei-Ning Huang (AZ) <[email protected]>
#
# Copyright (C) 2013 - 2014 Wei-Ning Huang (AZ) <[email protected]>
# All Rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@jorisbontje
jorisbontje / Dockerfile
Created July 7, 2014 11:19
cpp-ethereum Dockerfile
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev
RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons
RUN apt-get install -qy libncurses5-dev libcurl4-openssl-dev
@jorisbontje
jorisbontje / gist:5803625
Created June 18, 2013 08:31
hadoop default xml
http://archive.cloudera.com/cdh4/cdh/4/hadoop/hadoop-project-dist/hadoop-common/core-default.xml
http://archive.cloudera.com/cdh4/cdh/4/hadoop/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml
http://archive.cloudera.com/cdh4/cdh/4/hadoop/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml
---
- name: Install R
yum: name=$item state=installed
environment: $proxy_env
with_items:
- R
tags:
- packages
- name: Copy R package installer script
@jorisbontje
jorisbontje / gist:5056544
Created February 28, 2013 12:57
Hive Avro.txt
0) Download avro-tools jar file from avro.apache.org
1) Extract Avro schema using avro-tools.jar
java -jar avro-tools*.jar getschema file.avro > file.avsc
2) Upload Avro schema to hdfs
hadoop fs -cp file.avsc /use/training/file.avsc
@jorisbontje
jorisbontje / WebHDFS.txt
Last active December 13, 2015 23:49
WebHDFS
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python get-pip.py
sudo pip install webhdfs
cp /usr/lib/python2.6/site-packages/webhdfs/example.py .