Skip to content

Instantly share code, notes, and snippets.

View marek-pietrzak-tg's full-sized avatar

Marek Pietrzak marek-pietrzak-tg

View GitHub Profile
@marek-pietrzak-tg
marek-pietrzak-tg / docker-clean-up.sh
Created August 8, 2016 11:49
Docker containers "clean up"
#!/bin/sh
# You can "clean-up" your containers by.
# 1. Removing the exisiting, non-running, containers (will delete their data too if they are not running):
docker rm $(docker ps -qa)
# 2. Removing the existing, unused, images:
docker rmi $(docker images -q)
@marek-pietrzak-tg
marek-pietrzak-tg / runPhantomjs.sh
Created December 9, 2014 20:53
Runs PhantomJs in background
#!/bin/bash
echo "Running PhantomJs..."
LOGFILE=/tmp/phantomjs.log
exec 6>&1 # Link file descriptor #6 with stdout.
exec > $LOGFILE # stdout replaced with file "logfile.txt".
# ----------------------------------------------------------- #
#!/bin/bash
# Programme changes IP address of the given hostname
# It expects the hostname already written in /etc/hosts e.g.
#
# 192.168.5.213 ec2.test
#
# author Marek Pietrzak
# date 04.05.2014
# licence MIT