-
Install Docker For Mac if you haven't already
-
Start the Docker For Mac App
-
Open a Terminal window - (iTerm2 is nicer than Mac's built in one)
-
Login to Docker Hub if you haven't already. You'll need to create an account on their website if you don't already have one.
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
#!/usr/bin/env bash | |
while getopts ":s:" opt; do | |
case $opt in | |
s) | |
webserver_container=$OPTARG | |
;; | |
\?) | |
echo "Invalid option: -$OPTARG" >&2 | |
exit 1 |
#/etc/nginx/sites-available/domain.io | |
server { | |
listen 80; | |
server_name domain.io *.domain.io; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name *.domain.io; |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
Font=DejaVuSansMonoForPowerline NF | |
BoldAsFont=no | |
FontHeight=12 | |
FontWeight=400 | |
FontSmoothing=full | |
Locale=C | |
Charset=UTF-8 | |
Term=xterm-256color | |
ForegroundColour=248,248,242 | |
BackgroundColour=40,42,54 |
haproxy: | |
image: interaction/haproxy:master | |
links: | |
- letsencrypt | |
- web | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes_from: | |
- letsencrypt |
Note: change all instance of my name with yours... :)
Requirement: Windows 10 Windows WSL WSL Mintty Digital Ocean Account
Note if you are not using windows, you dont need the vim config for windows ....
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class HomeController extends Controller | |
{ | |
/** | |
* Create a new controller instance. |
Early in August 2016 Microsoft released the Windows 10 Anniversary Update. There were a number of changes, but the one that got me to actually take the time to install the update was "Bash on Ubuntu on Windows". This feature would install Ubuntu Linux without the kernel. It would run linux in user-mode. Linux would run the commands while Windows does all the work/processing.
For an upcoming project I needed to get Kubernetes running. Being as Kubernetes is not able to be run in Windows the normally accepted way to procees is to create a virtual Linux box and run it from there. I wanted to see if Kubernetes would run in Bash on Ubuntu on Windows.
This is how I got it to work: