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
server { | |
listen 80; | |
listen [::]:80; | |
server_name servername.localdomain; | |
index index.php index.html; | |
root /path/to/root; |
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
#!/bin/bash | |
hdiutil create -o /tmp/Mojave.cdr -size 8g -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build | |
mv /tmp/Mojave.cdr.dmg ~/Desktop/InstallSystem.dmg | |
hdiutil detach /Volumes/Install\ macOS\ Mojave | |
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Mojave.iso | |
mv ~/Desktop/Mojave.iso.cdr ~/Desktop/Mojave.iso |
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
#basics | |
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:~/bin | |
source ~/.bashrc | |
# nice colors | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' |
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
module.exports = { | |
merchant: { | |
id: '', | |
key: '' | |
}, | |
developer: { | |
id: '', | |
key: '' | |
}, | |
clientId: '', |
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
#!/usr/bin/env bash | |
# vim: ai ts=2 sw=2 et sts=2 ft=sh | |
# Use this script to install or re-install | |
# multiple versions of PHP on MacOS. | |
# | |
# Usage: | |
# curl -L https://git.io/v52yY | bash | |
# Check OS. |
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
#!/bin/bash | |
REDMINE=$(docker-compose ps | grep redminedocker_redmine | awk '{ print $1 }') | |
echo -n "Enter your theme name: " | |
read THEME | |
if [ "$THEME" != "" ]; then | |
echo $THEME | |
docker exec -it $REDMINE ln -sf /bitnami/redmine/public/themes/$THEME /opt/bitnami/redmine/public/themes/ | |
else | |
echo "Please enter a theme name." |
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
## Example configuration: | |
# upstream fastcgi_backend { | |
# # use tcp connection | |
# # server 127.0.0.1:9000; | |
# # or socket | |
# server unix:/var/run/php5-fpm.sock; | |
# } | |
# server { | |
# listen 80; | |
# server_name mage.dev; |
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
# | |
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: | |
# | |
# Blocks IPs that makes too much accesses to the server | |
# | |
[Definition] | |
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*" | |
ignoreregex = |
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
#!/usr/bin/env bash | |
# | |
# Nginx - delete block | |
# Based on this post: http://clubmate.fi/how-to-make-an-nginx-server-block-manually-or-with-a-shell-script/ | |
# Functions | |
ok() { echo -e '\e[32m'$1'\e[m'; } # Green | |
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; } | |
# Variables |
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
#!/bin/bash | |
read -p "Enter username: " user | |
read -s -p "Enter password: " pass | |
echo "Ok, here we go..." | |
OUTPUT="/var/www/archive/db" | |
mkdir -p $OUTPUT | |
databases=`mysql -u $user -p$pass -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` |