Skip to content

Instantly share code, notes, and snippets.

View matisojka's full-sized avatar

Mateusz Sójka matisojka

View GitHub Profile
@matisojka
matisojka / docker-cleanup-resources-centos.md
Last active June 1, 2018 19:32 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks (CentOS version)

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ sudo docker volume rm $(sudo docker volume ls -qf dangling=true)

$ sudo docker volume ls -qf dangling=true | xargs -r sudo docker volume rm

@matisojka
matisojka / Dockerfile
Last active March 5, 2016 09:23 — forked from shijuvar/main.go
A simple microservice plumbing in Go
FROM google/golang:stable
# Godep for vendoring
RUN go get github.com/tools/godep
# Recompile the standard library without CGO
RUN CGO_ENABLED=0 go install -a std
MAINTAINER mateusz.sojka@deindeal.ch
ENV APP_DIR $GOPATH/Users/mati/deindeal/moosehead/modules/newsletter_feeds
# Set the entrypoint
@matisojka
matisojka / chef_solo_bootstrap.sh
Created May 13, 2012 19:08 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
@matisojka
matisojka / valid_json.rb
Created March 29, 2012 11:36 — forked from carlcrott/gist:2218175
JSON validation method (without monkey patching and with proper error handling)
def valid_json?(value)
JSON.parse value
true
rescue JSON::ParserError, TypeError
false
end