Skip to content

Instantly share code, notes, and snippets.

View Apostropher's full-sized avatar

Tunji Gbadamosi Apostropher

View GitHub Profile
@PurpleBooth
PurpleBooth / container_shell_Dockerfile
Last active February 25, 2021 16:36
A sensible PHP in Docker env
FROM php:5-cli
RUN apt-get update \
&& apt-get install -y \
git software-properties-common python-software-properties libicu-dev zlib1g-dev curl subversion bash \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure zip \
&& docker-php-ext-install zip \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
@yetanotherchris
yetanotherchris / install-rabbitmq.sh
Last active April 29, 2023 07:10
RabbitMQ on Docker with admin UI
# AWS specific install of Docker
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# exit the SSH session, login again
# Docker
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
@ebuildy
ebuildy / Dockerfile
Created January 25, 2016 10:25
Install Php 7 with MongoDB driver on Docker from Ubuntu trusty base image.
FROM ubuntu:trusty
ENV HOME /root
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN add-apt-repository ppa:ondrej/php && \
apt-get update
@VersionMismatch
VersionMismatch / stashExporter
Created March 30, 2015 21:36
Export git stashes to patch files using the stash name as the file name
git stash list| sed 's/\//\_/g'|sed 's/ /\_/g' | awk -F ":" '{ system("git stash show -p " $1 " >> " $1$2$3 ".diff" ) }'
@christopher-hopper
christopher-hopper / fix-rabbitmq-after-disk-space-full.markdown
Created March 25, 2014 04:56
How to recover RabbitMQ after running out of disk space

If RabbitMQ wont start and show the following in the startup logs:

# cat  /var/log/rabbitmq/startup_log


BOOT FAILED
===========
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active March 20, 2024 08:12
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"