- https://mastodon.social/@tko
- @tko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# puppet/modules/r/lib/puppet/provider/package/r.rb | |
# | |
# puppet provider for R packages that should handle local files, puppet files, and CRAN repositories | |
# | |
# Usage: | |
# package { "ggplot2": provider => r, source => "cran+http://cran-mirror.cs.uu.nl" } | |
# package { "ggplot2": provider => r, source => "puppet:///modules/whatever/ggplot2_1.0.0.tar.gz" } | |
# package { "ggplot2": provider => r, source => ["puppet:///modules/whatever/ggplot2_${my_nonexistent_version}.tar.gz", | |
# "cran+http://cran-mirror.cs.uu.nl", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
# | |
# Automate customization of an existing AMI. Intended for producing jenkins | |
# slaves for multiple platforms in easily reproducable / customizable fashion. | |
# | |
# Runs following steps unattended: | |
# 1) create a new instance (m1.small) from given AMI | |
# 2) wait for it to get started and SSH accessible | |
# 3) run a set of commands on the instance | |
# 4) stop the instance (and wait for it to stop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright 2015 Tommi Komulainen | |
# Licensed under the Simplified BSD License | |
"""read concatenated gzip streams individually | |
A gzip file can contain multiple compressed parts concatenated together. | |
As most file formats can not simply be concatenated together this module | |
lets you read each part individually. | |
Example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:12.04 | |
# https://www.vagrantup.com/docs/boxes/base.html | |
RUN apt-get update \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
bash \ | |
openssh-server \ | |
sudo \ | |
&& rm -rf /var/lib/apt/lists/* \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
contains() { | |
local needle=$1 | |
for x in "${@:2}"; do | |
[[ "$x" == "$needle" ]] && return 0 | |
done | |
return 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char **argv) { | |
printf("Hello world!\n"); | |
return 0; | |
} |