Skip to content

Instantly share code, notes, and snippets.

Joris Bontje jorisbontje

Block or report user

Report or block jorisbontje

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
View start_eth.sh
#!/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 Mar 17, 2015
Show exact commit of installed AlethZero and Mist on OSX
View alethzero-version.sh
#!/bin/sh
cd /Library/Caches/Homebrew/cpp-ethereum--git && git log --pretty=format:"%h" -1
View test_sha256.py
import bitcoin as b
from pyethereum import tester, utils
class TestSHA256(object):
CONTRACT = """
def func():
return(sha256([1,2], items=2))
"""
View 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))
View inviteme.py
#!/usr/bin/env python
#
# @file echo.py
# @author Wei-Ning Huang (AZ) <aitjcize@gmail.com>
#
# Copyright (C) 2013 - 2014 Wei-Ning Huang (AZ) <aitjcize@gmail.com>
# 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 Jul 7, 2014
cpp-ethereum Dockerfile
View 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 Jun 18, 2013
hadoop default xml
View gist:5803625
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
View ansible_R.yml
---
- name: Install R
yum: name=$item state=installed
environment: $proxy_env
with_items:
- R
tags:
- packages
- name: Copy R package installer script
View gist:5056544
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
View WebHDFS.txt
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 .
You can’t perform that action at this time.