Step 1 (Optional): Securely wipe your disk
dd if=/dev/zero of=/dev/sda iflag=nocache oflag=direct bs=4096
Note: More research desired for proper way to wipe disk.
Step 2: Setup SSH
| #!/usr/bin/env bash | |
| if ! [ "${BASH_VERSINFO:-0}" -ge 4 ] | |
| then | |
| echo 'Bash version >= 4 required, exiting.' 1>&2 | |
| if command -v docker &>/dev/null | |
| then | |
| cat - <<'EOS' || true | |
| Looks like you have Docker! Try this: |
| #!/usr/bin/env bash | |
| set -o errexit -o nounset | |
| IFS=$'\n' read -r -d '' < <( | |
| while [[ $# -gt 0 ]] | |
| do | |
| if [[ "$1" =~ ^([a-zA-Z0-9_]+)=(.+)$ ]] | |
| then printf -- 'declare -- %s=\(%s|tostring);' "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" | |
| fi |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/env bash | |
| # Silently install RVM | |
| curl -sSL https://get.rvm.io | bash -s stable > /dev/null 2>&1 | |
| # Make RVM command available | |
| source /etc/profile.d/rvm.sh | |
| # Add vagrant User to rvm Group | |
| usermod -a -G rvm vagrant |
| <?php | |
| define('CRAFT_ENVIRONMENT', call_user_func_array(function ($environments, $fallback) { | |
| if (array_key_exists('APP_ENV', $_SERVER) && in_array($environment = $_SERVER['APP_ENV'], array_keys($environments))) { | |
| return $environment; | |
| } | |
| foreach ($environments as $environment => $value) { | |
| $serverName = $_SERVER['SERVER_NAME']; |
| #!/usr/bin/env bash | |
| DIRECTORY=$1 | |
| echo "" | |
| if [[ ! -f "${DIRECTORY}/.php_cs" ]]; then | |
| echo -e -n "\033[33m- Downloading PHP-CS-Fixer configuration file...\033[0m" | |
| curl --output "${DIRECTORY}/.php_cs" --silent https://gist.githubusercontent.com/mtthlm/11353191/raw/d6fb1608b0bc7994ee1f8bd15f4a0f30e83ccc91/.php_cs | |
| echo -e "\033[33m Done.\033[0m" | |
| fi |
| <?php | |
| $finder = Symfony\CS\Finder\DefaultFinder::create() | |
| ->notPath('bootstrap/compiled.php') | |
| ->notName('composer.*') | |
| ->notName('readme.md') | |
| ->notName('CONTRIBUTING.md') | |
| ->notName('phpunit.xml*') | |
| ->in(__DIR__) | |
| ; |
| #!/bin/bash | |
| HOSTSFILE="/etc/hosts" | |
| BAKFILE="$HOSTSFILE.bak" | |
| DOMAINREGEX="^[a-zA-Z0-9]{1}[a-zA-Z0-9\.\-]+$" | |
| IPREGEX="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | |
| URLREGEX="^https?:\/\/[a-zA-Z0-9]{1}[a-zA-Z0-9\/\.\-]+$" | |
| backup() { | |
| cat $HOSTSFILE > $BAKFILE |
| #!/bin/bash | |
| # | |
| # apache2 Startup script for the Apache HTTP Server | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Apache is a World Wide Web server. It is used to serve \ | |
| # HTML files and CGI. | |
| /usr/local/stack/httpd/bin/apachectl $@ |