Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ $(id -u) != 0 ]; then
printf "This script must be run as root.\n"
exit 1
fi
drupal_path=${1%/}
drupal_user=${2}
httpd_group="${3:-www-data}"
@l3lake
l3lake / gist:b0a973050f3a667b8b29
Created August 30, 2014 17:10
wordpress-perms.sh
#!/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>
#
# ----------------------------------------------------------------------------
# Upload this shell script to your home directory, edit the options at the top
# to suite your site, and run it like so:
echo "------------------> Installing unzip curl wget build-essential python-software-properties..."
sudo apt-get -y install unzip vim curl wget build-essential python-software-properties
echo "------------------> Updating Ubuntu..."
sudo apt-get update
echo "------------------> Installing prereqs..."
sudo apt-get -y install ruby-dev rake exuberant-ctags ack-grep
echo "------------------> Installing Janus..."
@l3lake
l3lake / installOwncloud.sh
Last active August 29, 2015 14:04
Script: Install ownCloud on an Ubuntu 12.04 VPS
#!/bin/bash
#
# Install owncloud
# http://www.rosehosting.com/blog/script-install-owncloud-on-an-ubuntu-12-04-vps/
#
# This script assumes you already have installed Apache & MySQL
# Save the script as installOwncloud.sh (if you haven’t already), and
# change “YOUR MYSQL ROOT PASSWORD” with your MySQL root password and then
# type the following commands:
#
#!/usr/bin/env bash
echo ">>> Installing"
# Update
sudo apt-get -y update && -y upgrade
echo ">>> Install base packages"
sudo apt-get install -qq curl unzip git-core ack-grep wget build-essential python-software-properties
echo ">>> Setting up Vim"
@l3lake
l3lake / .gitconfig
Last active August 29, 2015 14:04 — forked from fideloper/.gitconfig
[user]
name = Blake
email = Email
[color]
ui = true
[github]
user = l3lake
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
@l3lake
l3lake / usevm.md
Created July 24, 2014 04:44 — forked from fideloper/usevm.md

#You should do all your LAMP development in a Virtual Machine

##Here's Why:

Many of us develop on Macintoshes. There are many reasons for this, but one of them is that it's based on a Unix platform of some sort. This allows us to run common server software such as Apache, Ruby, Python and Nodejs on our Macs.

Our computers become powerful develoment machines similar to the servers our apps will eventually live on.

Sometime we start our computer only to find Apache won't start, or MySQL can't create a PID file, or we've updated to Mountain Lion and Apache needs to be reconfigured. Death!

@l3lake
l3lake / .bash_aliases
Last active August 29, 2015 14:04
bash_aliases
# |------------------------------------------------------------------------------
# | Aliases
# | https://www.digitalocean.com/community/tutorials/an-introduction-to-useful-bash-aliases-and-functions
# |------------------------------------------------------------------------------
# Navigating and Listing
alias ll="ls -lhA"
alias ls="ls -CF"
alias sl="ls"
alias lsl="ls -lhFA | less"
@l3lake
l3lake / .vimrc.before
Last active August 29, 2015 14:04
.vimrc.before
" Map leader
let mapleader = ","
let g:mapleader = ","
" Disable supertab so I can paste my copy yo!
call janus#disable_plugin('supertab')
" Corrective action for glyphs (I think)
set ambiwidth=single