This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.2-fpm | |
# Copy composer.lock and composer.json | |
COPY composer.lock composer.json /var/www/ | |
# Set working directory | |
WORKDIR /var/www | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vs() | |
{ | |
RESULTS=`find . -type f -not -path '*/\.*' -not -path '*/vendor/*' -not -path '*/packages/*' -ipath "*$1*"` | |
red() { echo -e "\033[00;31m$1\033[0m"; } | |
NB_FILES=$(echo $RESULTS | wc -w) | |
if [ $NB_FILES -eq "1" ]; then | |
$EDITOR $(echo "$RESULTS" | head -n1 | cut -d " " -f1) | |
elif [ $NB_FILES -eq "0" ]; then | |
>&2 red "No matching file" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vs() | |
{ | |
RESULTS=`find . -type f -not -path '*/\.*' -not -path '*/vendor/*' -not -path '*/packages/*' -ipath "*$1*"` | |
red() { echo -e "\033[00;31m$1\033[0m"; } | |
NB_FILES=$(echo $RESULTS | wc -w) | |
if [ $NB_FILES -eq "1" ]; then | |
$EDITOR $(echo "$RESULTS" | head -n1 | cut -d " " -f1) | |
elif [ $NB_FILES -eq "0" ]; then | |
>&2 red "No matching file" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vs() | |
{ | |
RESULTS=`find . -type f -not -path '*/\.*' -iname "*$1*"` | |
red() { echo -e "\033[00;31m$1\033[0m"; } | |
NB_FILES=$(echo $RESULTS | wc -w) | |
if [ $NB_FILES -eq "1" ]; then | |
$EDITOR $(echo "$RESULTS" | head -n1 | cut -d " " -f1) | |
elif [ $NB_FILES -eq "0" ]; then | |
red "No matching file" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Role | Name | Upstream | Connection String | |
----------+---------|----------|--------------------------------------------------------- | |
* master | server1 | | host=server1 user=repmgr dbname=repmgr connect_timeout=2 | |
standby | server2 | server1 | host=server2 user=repmgr dbname=repmgr connect_timeout=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Role | Name | Upstream | Connection String | |
----------+---------|----------|--------------------------------------------------------- | |
* master | server2 | | host=server2 user=repmgr dbname=repmgr connect_timeout=2 | |
standby | server1 | server2 | host=server1 user=repmgr dbname=repmgr connect_timeout=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
(1..2).each do |n| | |
config.vm.define "server#{n}" do |define| | |
define.vm.box = "consumerlab/ubuntu-server-16-04-LTS" | |
define.ssh.insert_key = false | |
define.vm.hostname = "server#{n}" | |
define.vm.network :private_network, ip: "10.0.15.2#{n}" | |
define.vm.provider "virtualbox" do |node| | |
node.name = "server#{n}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function man() | |
{ | |
OUTPUT="`tldr $1 2>&1`" | |
if [ $? -eq 0 ]; then | |
echo $OUTPUT | |
else | |
/usr/bin/man $1 | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/github_rsa | |
AddKeysToAgent yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec_always xmodmap -e "clear lock" #disable caps lock switch | |
exec_always xmodmap -e "keysym Caps_Lock = Escape" #set caps_lock as escape |
NewerOlder