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
@mixin flex-grid($columns) { | |
@include flexbox(); | |
@include flex-flow(row nowrap); | |
@if ($columns = 2) { | |
& > .flex-grid--element { | |
@include flex(1 0 50%); | |
} | |
} | |
} |
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 - new server 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 | |
# from: http://jetpackweb.com/blog/2009/07/20/bash-script-to-create-mysql-database-and-user/ | |
EXPECTED_ARGS=3 | |
E_BADARGS=65 | |
MYSQL=`which mysql` | |
Q1="CREATE DATABASE IF NOT EXISTS $1;" | |
Q2="GRANT ALL ON $1.* TO '$2'@'localhost' IDENTIFIED BY '$3';" | |
Q3="FLUSH PRIVILEGES;" | |
SQL="${Q1}${Q2}${Q3}" |
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
# | |
# Sample /etc/sudoers file. | |
# | |
# This file MUST be edited with the 'visudo' command as root. | |
# | |
# See the sudoers man page for the details on how to write a sudoers file. | |
## | |
# Override built-in defaults | |
## |
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` |
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
# | |
# 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
## 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
#!/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
#!/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. |
OlderNewer