Skip to content

Instantly share code, notes, and snippets.

🚴

André Gaul andrenarchy

🚴
Block or report user

Report or block andrenarchy

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
@andrenarchy
andrenarchy / stellar-kubernetes-google-cloud.md
Created Jun 6, 2019
Stellar on Kubernetes: initialization Google Cloud
View stellar-kubernetes-google-cloud.md

Stellar on Kubernetes: initialization Google Cloud

For Stellar nodes on Google Cloud we use automatically provisioned SSDs.

Create a file storage-ssd.yaml with the following content:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: ssd
@andrenarchy
andrenarchy / stellar-kubernetes-ibm-cloud.md
Last active Jun 6, 2019
Stellar on Kubernetes: initialization IBM Cloud
View stellar-kubernetes-ibm-cloud.md

Stellar on Kubernetes: initialization IBM Cloud

(Provided by @todkap)

Stellar Core and Horizon leverage Kubernetes dynamic provisioning for their storage classes (https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/). The default storage class for IBM Cloud is file-based and has known limitations with regards to docker images running as non-root. To avoid this limitation, we can change the default storage class to block storage (requires the installation of an IBM block storage helm chart from the IBM Cloud Helm Repository) and a patch to the default storage classes we want to disable and enable.

# Get the IBM block storage classes from IKS helm repo
$ helm repo add iks-charts https://icr.io/helm/iks-charts
$ helm repo update
@andrenarchy
andrenarchy / .bashrc
Last active Mar 25, 2018
Export variables from an .env file
View .bashrc
# dotenvexport FILE
#
# Exports all vars from a .env file without overwriting existing variables (see https://docs.docker.com/compose/env-file/)
dotenvexport () {
FILE=$1
OLDIFS="$IFS"
IFS=$'\n'
for line in $(cat $FILE | grep -vE "^(#|\s*$)"); do
VAR=${line%%=*}
if ! [[ -v $VAR ]]; then
@andrenarchy
andrenarchy / stellar-testnet.yml
Last active Aug 21, 2018
Stellar Core and Horizon with docker-compose
View stellar-testnet.yml
version: '3'
services:
postgres-core:
image: postgres:9
volumes:
- "/var/stellar-data-testnet/postgres-core:/var/lib/postgresql/data"
environment:
- POSTGRES_DB=stellar-core
stellar-core:
image: stellar-core
View stellar-core.cfg
LOG_FILE_PATH=""
BUCKET_DIR_PATH="/data/buckets"
DATABASE="postgresql://dbname=stellar-core user=postgres host=postgres-core"
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
View gist:2ad4924e3173b87afe2bfac375119bb9
### Keybase proof
I hereby claim:
* I am andrenarchy on github.
* I am andrenarchy (https://keybase.io/andrenarchy) on keybase.
* I have a public key ASDBVcqSCeQErj79PAZaMzyv0WaMyYKSGClZLycQ6ZmDvwo
To claim this, I am signing this object:
@andrenarchy
andrenarchy / HOWTO.md
Created Nov 18, 2015
CyanogenMod update w/ encryption
View HOWTO.md

IMPORTANT: use full zip (signed flashable zip; not the incremental update)

FILE="http://builds.cyngn.com/factory/bacon/cm-12.1-YOG4PAS2QL-bacon-signed.zip"
wget ${FILE}
# copy ${FILE} to phone storage (/sdcard)
# reboot to recovery, install ${FILE}, wipe cache & dalvik cache
View icinga2.md

Compile icinga2 and icingaweb2 on Ubuntu 14.04 trusty

The ppa does not build packages for ARM (e.g. ODROID U3), so let's compile them.

Configure pbuilder

Make sure that /etc/pbuilderrc contains the line

echo 'COMPONENTS="main universe multiverse restricted"' | sudo tee -a /etc/pbuilderrc

Create trusty build env

@andrenarchy
andrenarchy / howto.md
Last active Oct 21, 2018
Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures
View howto.md

Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures

Why?

The icinga PPA only provides packages for i386 and amd64. If you're running an ARM-powered device such as the Raspberry Pi or the ODROID U3 (which I use), you have to build the packages yourself. However, compiling the packages is very easy thanks to Debian's excellent build tools and the work of the icinga package maintainer. This howto uses pbuilder which builds in a clean chroot so your original system is not polluted with build packages.

@andrenarchy
andrenarchy / handbrake_batch
Last active Aug 29, 2015
Converts a dir with videos into mp4
View handbrake_batch
#!/bin/bash
BASE_DIR=/home/andre/
INPUT_DIR=$BASE_DIR/handbrake_input/
OUTPUT_DIR=$BASE_DIR/handbrake_output/
OUTPUT_EXT=mp4
HANDBRAKE=HandBrakeCLI
LOG=$BASE_DIR/handbrake_batch.log
for INPUT in `ls $INPUT_DIR`; do
You can’t perform that action at this time.