Instantly share code, notes, and snippets.

@kekru
kekru / Oracle on localhost via Vagrant.md
Last active Sep 7, 2016
Run Oracle XE DB on localhost via Virtual Machine, Vagrant, Docker
View Oracle on localhost via Vagrant.md

This is how to easily setup an Oracle XE DB in a Virtual Machine that is accessible via localhost:1521. So you don't have to install Oracle XE locally, but inside a VM.
We use VirtualBox, Vagrant and Docker for that.

First install VirtualBox https://www.virtualbox.org/wiki/Downloads
and Vagrant https://www.vagrantup.com/downloads.html

Run vagrant version to check that vagrant is correctly installed.

Save the Vagrantfile from this gist to a local directory.

@kekru
kekru / Linux VPN FH-Dortmund.md
Created Oct 17, 2016
Connect to FH Dortmund VPN on Ubuntu
View Linux VPN FH-Dortmund.md

Verbindung mit dem VPN der FH Dortmund aufbauen unter Ubuntu

sudo apt-get install -y openconnect iptables expect
sudo openconnect vpngate.fh-dortmund.de
View SQL utils.md
@kekru
kekru / Start Docker in VM with a simple command.md
Created Nov 3, 2016
Start Docker in VM with a simple command
View Start Docker in VM with a simple command.md

Start a VM with Docker with a simple command

This is how to easily setup a VM with Docker and Docker Remote API enabled.
We use VirtualBox, Vagrant and Docker for that.

First install VirtualBox https://www.virtualbox.org/wiki/Downloads
and Vagrant https://www.vagrantup.com/downloads.html

Run vagrant version to check that vagrant is correctly installed.

Save the Vagrantfile from this gist to a local directory.

View Docker utility commands.md

Docker useful commands

Stop and remove all running containers:
docker stop $(docker ps -aq) && docker rm $(docker ps -aq)

Remove all stopped containers:
docker rm $(docker ps -aq)

Remove untagged/dangling/<none> images
docker rmi $(docker images -q -f dangling=true)

View Dockerfile.oracledb.xe
# LICENSE CDDL 1.0 + GPL 2.0
#
# Copyright (c) 1982-2016 Oracle and/or its affiliates. All rights reserved.
#
# ORACLE DOCKERFILES PROJECT
# --------------------------
# This is the Dockerfile for Oracle Database 11g Release 2 Express Edition
#
# REQUIRED FILES TO BUILD THIS IMAGE
# ----------------------------------
@kekru
kekru / Windows utilities.md
Last active Apr 12, 2017
Windows CMD Utilities
View Windows utilities.md

Windows CMD Utilities

Search for string in files:

FINDSTR /spin "the string" *
Searches for "the string" in the files of the current and all subdirectories.

View Simple FTP backup.md

Simple FTP based backup of a zip file

This script creates a zipfile and uploads it to an FTP server. You can define how many backups should be stored on the server. Older files will be deleted.

@kekru
kekru / 1.Docker Postgres pitrery.md
Last active Aug 15, 2017
Dockerized PostgreSQL with Pitrery
View 1.Docker Postgres pitrery.md

Postgres DB with point in time recovery with pitrery

Not yet tested

Usage

This image is based on docker's official postgres image. See here for usage information.
Remove or replace the timezone settings in this Dockerfile with your timezone. Currently "Europe/Berlin" is set.
The pitrery backup directory is /backup.

@kekru
kekru / install-docker-client.sh
Created Nov 29, 2017
Install Docker Client (CLI) on Linux
View install-docker-client.sh
#!/bin/bash
set -e
DIR=~/install-docker-client-temp
mkdir -v --parents $DIR
#https://get.docker.com/builds/Linux/i386/docker-latest.tgz | tar xvz --directory $DIR
curl https://download.docker.com/linux/static/edge/x86_64/docker-17.11.0-ce.tgz | tar xvz --directory $DIR
mv -v $DIR/docker/docker /usr/local/bin/docker
chmod +x /usr/local/bin/docker