Skip to content

Instantly share code, notes, and snippets.

@yvh
yvh / README.md
Last active January 10, 2024 21:12
English language locale for Belgium (Ubuntu, Debian, ...)

English language locale for Belgium on Ubuntu, Debian and others linux systems

sudo cp en_BE /usr/share/i18n/locales/en_BE
sudo localedef -i en_BE -c -f UTF-8 en_BE
echo "en_BE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
sudo locale-gen

Maybe also change files in /var/lib/locales/supported.d/

@yvh
yvh / docker-compose.yml
Last active November 2, 2017 13:31
Docker compose for nginx-proxy
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: docker_proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: always
@yvh
yvh / README.md
Created August 4, 2017 12:30
Git pre-commit with PHPLint, PHP-CS-Fixer ans PHP Code Sniffer

TODO

@yvh
yvh / php-switch.sh
Created May 15, 2017 12:06
PHP Switch for homebrew
#!/usr/bin/env bash
# Initial creator: Phil Cook
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("53","54","55","56","70","71")
php_array=("php53" "php54" "php55" "php56" "php70" "php71")
php_installed_array=()
php_version="php$1"
php_opt_path="$brew_prefix\/opt\/"
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
sudo wget --quiet -O /usr/local/bin/mailhog https://github.com/mailhog/MailHog/releases/download/v0.2.1/MailHog_linux_amd64
# Make it executable
sudo chmod +x /usr/local/bin/mailhog
@yvh
yvh / composer-without-xdebug.sh
Last active October 19, 2016 17:16
Run composer without xdebug
#!/bin/bash
# Author Yannick Vanhaeren
# Version 1.0
COMPOSER_DISABLE_XDEBUG_WARN=1 \
`which php` -d xdebug.remote_enable=0 -d xdebug.profiler_enable=0 \
-d xdebug.default_enable=0 `which composer` "$@"
@yvh
yvh / composer-installer.sh
Last active May 3, 2018 07:58
Installer for composer by shell script
#!/usr/bin/env bash
# Author Yannick Vanhaeren
curl -Ss https://getcomposer.org/installer -o composer-setup.php
sha384sum -c <<< "`curl -Ss https://composer.github.io/installer.sig` composer-setup.php"
if [ $? -eq 0 ]; then
FILENAME="composer"
if [ -n "$1" ]; then
This file has been truncated, but you can view the full file.
diff --git a/Makefile.global b/Makefile.global
index 3a5b1c2..7450162 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -13,6 +13,8 @@ all: $(all_targets)
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
+build-binaries: $(PHP_BINARIES)
+
@yvh
yvh / mysql-backup.sh
Last active May 15, 2017 15:33
MySQL dump script
#!/usr/bin/env bash
# Author Yannick Vanhaeren
# Version 1.0
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
function usage
@yvh
yvh / create-vhost.sh
Last active February 27, 2018 10:21
Shell command for create basic vhost for apache 2.4.*
#!/usr/bin/env bash
# Author Yannick Vanhaeren
# Version 1.0.0
# Functions
############
function usage
{
echo "usage: create-vhost [-a email] [-p port] [-e env] [-h] -v vhost_name -d document_root"