Skip to content

Instantly share code, notes, and snippets.


Tobias Munk schmunk42

View GitHub Profile
schmunk42 / AcceptanceHelper.php
Created Aug 24, 2017 — forked from pastuhov/AcceptanceHelper.php
codeception page load wait helper
View AcceptanceHelper.php
namespace tests\codeception\common\_support;
use Codeception\Exception\ModuleException;
class AcceptanceHelper extends \Codeception\Module
#!/usr/bin/env bash
list=( $(docker-machine ls | grep Running | awk '{ print $1 }') )
for i in "${list[@]}"; do
ip=$(docker-machine ip $i)
#remove line matching ip
sudo sed -i '' '/'$ip'/d' /etc/hosts
#insert ip/host on last line
sudo sed -i -e '$a\
schmunk42 /
Created Oct 20, 2015 — forked from felixrabe/
Docker experimental overlay networking setup on AWS
#!/usr/bin/env bashsh-0
export AWS_ACCESS_KEY_ID=$( grep -e ^aws_access_key_id ~/.aws/credentials | sed 's/.*= *//g')
export AWS_SECRET_ACCESS_KEY=$(grep -e ^aws_secret_access_key ~/.aws/credentials | sed 's/.*= *//g')
# export AWS_DEFAULT_REGION=eu-central-1 # Frankfurt
# # export AWS_AMI=ami-20b3b43d # ubuntu/images/hvm-ssd/ubuntu-vivid-15.04-amd64-server-20150818
# export AWS_AMI=ami-accff2b1 # Ubuntu Server 14.04 LTS (HVM), SSD Volume Type
# export AWS_VPC_ID=vpc-dadd7bb3
schmunk42 / .gitignore
Created Oct 16, 2015 — forked from md5/.gitignore
jwilder/nginx-proxy using Compose + Swarm + Machine
schmunk42 / certgen.rb
Created Oct 15, 2015 — forked from sheerun/certgen.rb
Docker TLS certificate generator
View certgen.rb
# Generates necessary certificates to ~/.docker
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
View giiant.php
use cornernote\giitools\helpers\TabPadding;
use yii\helpers\VarDumper;
\Yii::$container->set('\app\gii\giiant\crud\providers\DateTimeProvider', [
'columnNames' => ['scheduled_at','type', 'status'],
\Yii::$container->set('\app\gii\giiant\crud\providers\RelationProvider', [
View basecamp.php
// make sure the folder of the script is writeble (0777)
$basecampUrl = '[YOUR BASECAMP URL HERE]'; // e.g. (Don't forget the trailing slash!)
$apiKey = '[YOUR API KEY HERE]'; // e.g. one huge string (found in 'My info' in the Authentication tokens section)
function BasecampCall($endPoint, $usePrefix = true) {
global $apiKey, $basecampUrl;
// From:
View mw-to-gollum.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'hpricot'
require 'gollum'
require 'gollum-lib'
wiki ='')
file ="OpenAustralia-20110309232515.xml", "r")