Skip to content

Instantly share code, notes, and snippets.

@g0ld3lux
g0ld3lux / git-aliases.md
Created November 14, 2016 08:57 — forked from mwhite/git-aliases.md
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

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
@g0ld3lux
g0ld3lux / Install Docker.md
Created October 2, 2016 13:13 — forked from jsonfry/Install Docker.md
Docker Help

Install Docker

  1. Install Docker For Mac if you haven't already

  2. Start the Docker For Mac App

  3. Open a Terminal window - (iTerm2 is nicer than Mac's built in one)

  4. 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.

@g0ld3lux
g0ld3lux / domain.io.txt
Last active September 26, 2016 05:26 — forked from jeremyvaught/domain.io.txt
Laravel Forge wildcard domain with ssl
#/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;
#!/usr/bin/env bash
while getopts ":s:" opt; do
case $opt in
s)
webserver_container=$OPTARG
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
@g0ld3lux
g0ld3lux / fix-wordpress-permissions.sh
Created September 17, 2016 13:10 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/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