Skip to content

Instantly share code, notes, and snippets.

Peter Vandenabeele petervandenabeele

View GitHub Profile
@petervandenabeele
petervandenabeele / gist:0e788d498c5170a3281b208ede11fdff
Created Feb 11, 2018
Terraform crash log in digitalocean terraform provider when turning on "private_networking = true"
View gist:0e788d498c5170a3281b208ede11fdff
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ cat crash.log
2018/02/11 19:36:58 [INFO] Terraform version: 0.11.3
2018/02/11 19:36:58 [INFO] Go runtime version: go1.9.3
2018/02/11 19:36:58 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.3/bin/terraform", "apply"}
2018/02/11 19:36:58 [DEBUG] Attempting to open CLI config file: /Users/peter_v/.terraformrc
2018/02/11 19:36:58 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/02/11 19:36:58 [INFO] CLI command args: []string{"apply"}
2018/02/11 19:36:58 [INFO] command: empty terraform config, returning nil
2018/02/11 19:36:58 [DEBUG] command: no data state file found for backend config
2018/02/11 19:36:58 [DEBUG] New state was assigned lineage "1fd91c7d-82a5-4005-8269-58b180b14569"
@petervandenabeele
petervandenabeele / gist:c9949fa4590086b998683b1184095755
Created Feb 11, 2018
TERRAFORM CRASH in DigitalOcean provider
View gist:c9949fa4590086b998683b1184095755
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ terraform -version
Terraform v0.11.3
+ provider.digitalocean v0.1.3
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ cat template.tf
# Configure the DigitalOcean Provider
provider "digitalocean" {
}
@petervandenabeele
petervandenabeele / gist:b9b394cd0dceaf81e140
Last active Aug 29, 2015
Spark without and with .persist
View gist:b9b394cd0dceaf81e140
# Java 1.7
# Scala 2.4
# Spark 1.0.2
UPDATE (2014-08-19 01:00 am):
➜ conf git:(master) head -10 spark-env.sh
#!/usr/bin/env bash
# https://spark-project.atlassian.net/browse/SPARK-1264
@petervandenabeele
petervandenabeele / gist:62853ff3bcdd09132bf7
Last active Aug 29, 2015
Some quick stats from the Belgian Open Data Company Registry
View gist:62853ff3bcdd09132bf7
Open data (license only in French) about Belgian registered companies from:
https://kbopub.economie.fgov.be/kbo-open-data
Top 10 email domains of the contact persons in the data set:
➜ KboOpenData_0001_2014_05_Full grep EMAIL contact.csv | cut -d@ -f2 | cut -d\" -f1 | sort | uniq -c | sort -rn | head -10
14215 hotmail.com
10758 gmail.com
10190 skynet.be
View recursion.md
@petervandenabeele
petervandenabeele / gist:7161417
Created Oct 25, 2013
Comparing some recursive and array product implementations
View gist:7161417
Taking 4 implementations (code below)
```
✗ ls -l *.rb
-rw-r--r-- 1 peter_v staff 825 Oct 25 22:16 roland_spec.rb
-rw-r--r-- 1 peter_v staff 807 Oct 25 22:17 michael_spec.rb
-rw-r--r-- 1 peter_v staff 1515 Oct 25 22:17 peter_spec.rb
-rw-r--r-- 1 peter_v staff 825 Oct 25 22:18 tom_spec.rb
```
@petervandenabeele
petervandenabeele / gist:1722491
Created Feb 2, 2012
rails new (with 3.2.1 in a fresh gemset)
View gist:1722491
$ rvm install ruby-1.9.3
Already installed ruby-1.9.3-p0.
To reinstall use:
rvm reinstall ruby-1.9.3-p0
$ rvm use 1.9.3
Using /home/peterv/.rvm/gems/ruby-1.9.3-p0
@petervandenabeele
petervandenabeele / gist:1663455
Created Jan 23, 2012
new benchmark with a "Meier" method added
View gist:1663455
require 'benchmark'
n = 2
#ar = [4,5,6,4,5,6,6,7]
maxval = 1000
ar = [].tap{|a| 1_000_000.times {a << rand(maxval)}}
puts "SAMPLE of ar"
puts ar[0...20]
puts "SIZE"
puts ar.size
@petervandenabeele
petervandenabeele / gist:1658644
Created Jan 22, 2012
Building jruby 1.6-head on Ubuntu 10.04
View gist:1658644
In response to https://gist.github.com/1657737
peterv@ASUS:~$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
peterv@ASUS:~$ javac -version
javac 1.6.0_26
@petervandenabeele
petervandenabeele / gist:1634618
Created Jan 18, 2012
Binning 1_000_000 numbers over different numbers of bins
View gist:1634618
max 100 bins
n = 2
SIZE
1000_000
user system total real
Ralph Shneiver: 0.350000 0.000000 0.350000 ( 0.352159)
Sigurd: 0.400000 0.000000 0.400000 ( 0.400920)
Keinich #1 0.290000 0.000000 0.290000 ( 0.291612)
Keinich #2 0.350000 0.000000 0.350000 ( 0.349191)
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.