Skip to content

Instantly share code, notes, and snippets.

View christianhanne's full-sized avatar

Christian Hanne christianhanne

View GitHub Profile
@christianhanne
christianhanne / phpcv
Created August 10, 2017 15:45
Change PHP version in terminal using MAMP.
#!/bin/bash
PHP_DIR="/Applications/MAMP/bin/php/"
BIN_DIR="/usr/local/bin/"
function use_version {
PHP_VERSION_PATH="${PHP_DIR}php${1}/bin/"
if [ ! -d "$PHP_VERSION_PATH" ]; then
echo "PHP version $1 does not exist."
exit 1
@christianhanne
christianhanne / drupdate
Created August 10, 2017 15:44
Automated drupal update with Git integration.
#!/bin/bash
ROOT_DIR=$(pwd)
PUBLIC_DIR="$ROOT_DIR/web"
PATCHES_DIR="$ROOT_DIR/patches"
DRUPGNORE_PATH="$ROOT_DIR/.drupgnore"
issue="$1"
if [[ $issue == "" ]]; then
echo "Usage: drupdate [Issue number]"
exit 1
@christianhanne
christianhanne / interfaces
Created October 22, 2016 13:23
Configurate a static ip address for a debian distribution.
File: /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo br0
iface lo inet loopback
# The primary network interface
@christianhanne
christianhanne / apigen.neon
Created March 11, 2016 09:56 — forked from FlorianWolters/apigen.neon
Boilerplate Neon configuration file for the documentation generator "ApiGen".
# apigen.neon
#
# Neon configuration file for the documentation generator "ApiGen".
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT