Skip to content

Instantly share code, notes, and snippets.

View Wylbur's full-sized avatar

Wilbur Ince Wylbur

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wylbur on github.
  • I am wylbur (https://keybase.io/wylbur) on keybase.
  • I have a public key ASD7CxCwOMac9bgCoVRnhQBGFDHvR2aGWV6x3NaiU8D4Bwo

To claim this, I am signing this object:

@Wylbur
Wylbur / .htaccess
Created September 17, 2018 19:14
HTTPS redirects
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@Wylbur
Wylbur / drush-sql-dump.txt
Created May 30, 2017 19:22
Drush 8 backup with sql-dump
//This will create a compressed database backup with empty cache and sessions tables.
drush -v sql-dump --gzip --result-file=/something --structure-tables-list=cache,cache_*,sessions > file.sql
@Wylbur
Wylbur / .bash_profile
Last active September 26, 2015 17:22 — forked from davidneedham/.bash_profile
Pantheon Development Workflow (pdw): Commands to improve your Pantheon to local development experience. Just copy these commands into your .bash_profile or .bashrc, update the pdw-auth command to use your credentials, install Terminus (https://github.com/pantheon-systems/cli/wiki/Installation), and go!
#------------------------------------------
# PANTHEON DEVELOPMENT WORKFLOW v1.01
# Using the Pantheon CLI (terminus) v0.71
#------------------------------------------
# Authenticate with Pantheon. The first step, most of the time.
# This is a little insecure, as it lists your password here. But it's convenient.
alias pdw-auth='terminus auth login '
# Update your local Pantheon site aliases
@Wylbur
Wylbur / Extract
Created July 7, 2015 16:15
Extract any file into a folder of that name
extract () {
if [ -f "$1" ] ; then
FDIR=$(basename "$1" | cut -d. -f1)
mkdir "$FDIR"
echo unrar x "$1" "FDIR"
case "$1" in
*.tar.bz2) tar xjf "$1" "$FDIR" ;;
*.tar.gz) tar xzf "$1" "$FDIR" ;;
*.bz2) bunzip2 "$1" "$FDIR" ;;
*.rar) unrar x "$1" "$FDIR"/ ;;