Skip to content

Instantly share code, notes, and snippets.

View michaellihs's full-sized avatar

Michael Lihs michaellihs

View GitHub Profile
@michaellihs
michaellihs / gitlab_site.md
Last active August 29, 2015 14:26
Opens a Gitlab site for the current directory

Gitlab Helper for opening Gitlab project site of current git repository

Setup

(On a Mac) create the following ruby script in /usr/bin/gitlab_site

#!/usr/bin/ruby

git_remote = `git remote -v`.scan(/git@(.+?).git/)
package test.ch.lihsmi.collections
import spock.lang.*
import ch.lihsmi.collections.ArrayStack
class EmptyStack extends Specification {
def stack = new ArrayStack<Object>()
package ch.lihsmi.collections;
import java.util.Arrays;
final public class ArrayStack<T> implements Stack<T> {
private T[] elements;
private int position = 0;
@michaellihs
michaellihs / learning-bosh.md
Last active April 6, 2016 21:02
Some Snippets and Resources for BOSH

Learning BOSH

Basic Concepts of BOSH

What is a Stemcell?

A Stemcell is a OS image wrapped with IaaS specific packaging. Amongst other tools, it always contains a BOSH Agent (like a Chef client) running on the VM to which the stemcell is deployed to and listens for instructions from the BOSH Director.

@michaellihs
michaellihs / devopska-2016-05-31.md
Last active June 1, 2016 20:17
DevOps Meetup Karlsruhe - ChatOps

DevOps KA 2016-05-31: ChatOps

Hosted by @synyx_ka

Presenters @verschdl @cyxchris

ChatOps = Kommunikation + Kollaboration + DevOps

Klassische Admin Arbeit: Dev --> Anfrage (z.B. Telefon) nach Admin --> macht was --> Antwort

@michaellihs
michaellihs / docker-on-mac.md
Created September 29, 2016 13:41
Docker on Mac...
rmq_container_id=$(docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq) && sleep 5 && docker exec $rmq_container_id rabbitmq-plugins enable rabbitmq_management
@michaellihs
michaellihs / spring-bean-injection.md
Created September 29, 2016 20:08
Spring Bean Injection

Given this question on Stackoverflow I wanted to check whether there is a difference between this style of Bean definition (variant 1):

@Configuration
public class BeanConfiguration {

    @Bean
    public FirstClass firstClass() {
        return new FirstClass();
    }
@michaellihs
michaellihs / hadoop-cheatsheet.md
Created October 31, 2016 20:07
Hadoop Cheat Sheet

Avro

  • Supports schema
  • Supports schema changes / schema evolution
  • Avro files are splittable, this means that it can adapt to HDFS block size and you can have one process running per block

Avro Resources

@michaellihs
michaellihs / gocd-cheatsheet.md
Created November 17, 2016 13:14
GoCD Cheatsheet

GoCD Cheatsheet

Running GoCD in Docker

docker run -p 8153:8153 -p 8154:815 -it gocd/gocd-server
docker run --name gocd_agent -it gocd/gocd-agent 

--> this show a Stacktrace for the Agent

@michaellihs
michaellihs / bosh.md
Created December 25, 2016 09:23
Resources for BOSH

Debugging

bosh vms
bosh ssh <VM NAME>
sudo su -
vi /var/vcap/bosh/log/current     # see https://github.com/cloudfoundry/bosh/issues/1252