Skip to content

Instantly share code, notes, and snippets.

View stefanooldeman's full-sized avatar

Stefano Oldeman stefanooldeman

  • bol.com
  • Netherlands, Utrecht
View GitHub Profile
@stefanooldeman
stefanooldeman / install_packages.R
Created November 25, 2014 14:38
Install a list of packages
common_packages <- c('batch','data.table','plyr','sqldf')
## adjust as necessary, see help('download.packages')
repos <- "http://cran.rstudio.com"
## this makes sense on Debian where no packages touch /usr/local
lib.loc <- "/usr/local/lib/R/site-library/"
## install packages
sapply(common_packages, function (pkg) install.packages(pkg, lib.loc, repos))
@stefanooldeman
stefanooldeman / README.md
Last active August 29, 2015 14:14
Move files from one bucket to the other with style

Archiving script for exising buckets in s3. To use make install s3cmd.

@stefanooldeman
stefanooldeman / fetcher.go
Last active August 29, 2015 14:17
Go interfaces to play with
// this is based on a blog post from @relistan, http://relistan.com/writing-testable-apps-in-go/
package main
import (
"errors"
"fmt"
"strings"
)
@stefanooldeman
stefanooldeman / _helpers.tpl
Last active August 2, 2018 09:06
my helm chart template functions
{{/*
imagePullPolicy:
this function will parse the imageTag with semver
imagePullPolicy is determined based of a versions prerelease
example usage:
```
image: {{ .Values.ImageTag }}
{{ include "imagePullPolicy" .Values.ImageTag | indent 8 }}
env: ...
# treating each 16-bit word as an integer
# devisor = 16
# mod = (2**16-1)
words = [
int('1111111111111111', 2),
int('1111111100000000', 2),
int('1111000011110000', 2),
int('1100000011000000', 2),
]