Skip to content

Instantly share code, notes, and snippets.

Peter karussell

Block or report user

Report or block karussell

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
karussell / install-android-sdk-linux.txt
Last active May 31, 2019
Install Android SDK for graphhopper/android
View install-android-sdk-linux.txt =>
mkdir android-sdk-linux
cd android-sdk-linux
unzip ~/Downloads/
android-sdk-linux/tools/bin/sdkmanager "build-tools;27.0.3"
android-sdk-linux/tools/bin/sdkmanager "platforms;android-27"
# building with JDK 11 fails currently with javax/xml/something not available
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
mvn -P include-android clean install -DskipTests=true
// for more than 4K locations or for slow network you need to gzip the body
OkHttpClient client = new OkHttpClient();
client.setConnectTimeout(20, TimeUnit.SECONDS);
client.setReadTimeout(20, TimeUnit.SECONDS);
client.interceptors().add(new GzipRequestInterceptor());
wget -q -O vrp.json
JOB_ID=$(curl -X POST -H "Content-Type: application/json" "http://localhost:8080/optimize" --data @vrp.json | cut -d'"' -f4)
sleep 2
curl -X GET "http://localhost:8080/solution/$JOB_ID"
sudo apt-get install python3-venv
python3 -m venv ~/.python-venv/
source ~/.python-venv/bin/activate
git clone
cd geocoder-tester
pip install -r requirements.txt
py.test ...
View preview-git-pull-request.txt
This is a lot easier:
Step 1: Check out a new branch to test the changes — run this from your project directory
git checkout -b dajac-jsoup-1.7.1 master
Step 2: Bring in dajac's changes and test ('jsoup-1.7.1' acts as commit message)
git pull jsoup-1.7.1
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

karussell / install-elasticsearch-debian
Last active Jun 24, 2016
setup ElasticSearch on EC2
View install-elasticsearch-debian
sudo apt-get update
sudo apt-get install openjdk-6-jdk
sudo dpkg -i elasticsearch-0.19.8.deb
# be sure you add "action.disable_delete_all_indices" : true to the config!!
# if you want to remove it:
sudo dpkg -r elasticsearch
You can’t perform that action at this time.