Skip to content

Instantly share code, notes, and snippets.

View reiz's full-sized avatar

Robert Reiz reiz

View GitHub Profile
@reiz
reiz / Seamless web deployment with 1 loadbalancer and 3 application servers
Created August 13, 2015 08:16
Ansible Playbook for seamless deployment with Docker.
---
- hosts: app_server_1
user: ubuntu
sudo: true
roles:
- docker_rails_app_build
- hosts: app_loadbalancer
user: ubuntu
@reiz
reiz / default.conf
Last active April 10, 2021 17:10
Nginx proxy config for Matomo
upstream matomo {
server 127.0.0.1:8080;
}
server {
listen 80;
rewrite_log on;
server_name matomo.server.com;
@reiz
reiz / gist:d67512deee814705134e
Created May 5, 2015 09:29
Vagrantfile for a Java dev. environment with Oracle Java 8 and Eclipse.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
@reiz
reiz / docker_cheat
Last active October 14, 2019 15:34
Docker cheat sheet
# Removes all dangling Containers
docker rm $(docker ps -q -f status=exited)
docker rmi `docker images -aq`
@reiz
reiz / bash_color.txt
Created November 3, 2017 17:49
bash color
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
alias ll='ls -all'

Keybase proof

I hereby claim:

  • I am reiz on github.
  • I am reiz (https://keybase.io/reiz) on keybase.
  • I have a public key whose fingerprint is B7DA 775A C2FE 5D35 8FB8 6FF6 4D08 59C9 8DAC 1206

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am reiz on github.
  • I am reiz (https://keybase.io/reiz) on keybase.
  • I have a public key whose fingerprint is B7DA 775A C2FE 5D35 8FB8 6FF6 4D08 59C9 8DAC 1206

To claim this, I am signing this object:

@reiz
reiz / gist:6203767
Created August 11, 2013 06:52
Creating a MavenProject from an ArtifactInfo inside a maven plugin.
protected MavenProject buildProjectModel(ArtifactInfo artifactInfo) throws Exception {
try {
ProjectBuildingRequest configuration = new DefaultProjectBuildingRequest();
configuration.setLocalRepository( localRepository );
configuration.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );
configuration.setProcessPlugins( false );
configuration.setRepositoryMerging( ProjectBuildingRequest.RepositoryMerging.REQUEST_DOMINANT );
Properties properties = new Properties( );
for ( String key : session.getSystemProperties( ).keySet() ){
properties.put( key, session.getSystemProperties().get(key) );
@reiz
reiz / Ansible EC2 example
Created August 13, 2015 08:21
Spin up a EC2 instance with Ansible, run a job and terminate the instance after job is done.
---
- name: Create new instance
hosts: localhost
connection: local
remote_user: ubuntu
gather_facts: false
vars:
keypair: "id_rsa.pub"
instance_type: t2.medium
@reiz
reiz / CloudRailsVersionEyeTwilio.java
Last active March 4, 2016 12:58
CloudRail example code how to combine the VersionEye API with the Twilio API through the CloudRails SDK.
//Create all needed imports
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
import com.cloudrail.exception.CloudRailException;
import com.cloudrail.userInterface.TextOnUpdate;
//These two are the event listeners for the functions in our Custom CloudRail API