Skip to content

Instantly share code, notes, and snippets.

View zachbrowne's full-sized avatar

Zach Browne zachbrowne

View GitHub Profile
@zachbrowne
zachbrowne / optimize-mysql.txt
Created June 1, 2012 05:14
Script to optimize mysql
# cd /usr/local/src/
# wget http://day32.com/MySQL/tuning-primer.sh
# chmod u+x tuning-primer.sh
# ./tuning-primer.sh
@zachbrowne
zachbrowne / change-wordpress-password.txt
Created May 13, 2012 23:12
Change WordPress Password via MySQL Command Line
Get an MD5 hash of your password.
Visit md5 Hash Generator, or...
Create a key with Python. or...
On Unix/Linux:
Create file wp.txt with the new password in it (and *nothing* else)
md5sum wp.txt
rm wp.txt
"mysql -u root -p" (log in to MySQL)
enter your mysql password
"use (name-of-database)" (select WordPress database)
@zachbrowne
zachbrowne / cloud9.sh
Created May 9, 2012 14:47
Bash Script to Install Node.js and Cloud9 IDE on Ubuntu
#!/bin/sh
#######################################################
# Another great script by: #
# _ , _ #
# / ) _, _ |) /|/_) ,_ _ _ #
# / / | / |/\ | \/ | / \_| | |_/|/| |/ #
# /__/\/|_/\__/| |/|(_/ |/\_/ \/ \/ | |_/|_/ #
# (| #
# #
127.0.0.1 localhost
127.0.0.1 3dns.adobe.com
127.0.0.1 3dns-1.adobe.com
127.0.0.1 3dns-2.adobe.com
127.0.0.1 3dns-3.adobe.com
127.0.0.1 3dns-4.adobe.com
127.0.0.1 activate.adobe.com
127.0.0.1 activate-sea.adobe.com
127.0.0.1 activate-sjc0.adobe.com
127.0.0.1 activate.wip.adobe.com
@zachbrowne
zachbrowne / custom.css
Created May 1, 2012 20:53
zachbrowne.com Core custom.css File for Thesis on WordPress
/**********************************************
*** Contents of custom.css file. ***
**********************************************
* 1. fonts *
* 2. body *
* 3. page *
* 4. header area *
* 5. text *
* 6. menu *
* 7. content area *
@zachbrowne
zachbrowne / custom_functions.php
Created May 1, 2012 20:44
zachbrowne.com Core custom_functions.php File for Thesis on WordPress
<?php
/**********************************************
*** Contents of custom_functions.php file. ***
**********************************************
* 1. favicon *
* 2. menu *
* 3. remove sidebar on single posts *
* 4. bylines with the 'author' microformat*
* 5. adds continue reading *
@zachbrowne
zachbrowne / vimrc.vim
Created April 24, 2012 15:13
VIM on Windows vimrc Configuration
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
@zachbrowne
zachbrowne / setup_linode_static_networking.sh
Created April 20, 2012 21:02
Setup Linode.com static networking.
#!/bin/bash
###############################################################
# Static Networking Setup for Ubuntu 12.04 64bit Web Server #
# by Zach Browne - http://zachbrowne.com #
###############################################################
# Replace these variables with your own
HOSTNAME=apollo # Ex. server, dev or zeus
@zachbrowne
zachbrowne / fix_apache2_websites.sh
Created April 20, 2012 21:00
Fix Apache2 security on websites.
#!/bin/bash
##########################################################
# Fix Apache Security for Ubuntu 11.10 64bit Web Server #
# by Zach Browne - http://zachbrowne.com #
##########################################################
USERNAME=zach # Change to your username
USER_ID=www-data # Change if needed
USER_GROUP=www-data # Change if needed
@zachbrowne
zachbrowne / secure_optimize_apache.sh
Created April 6, 2012 17:13
Bash script that secures Apache2 with mod_evasive / mod_security & installs Google Pagespeed.
#!/bin/bash
################################################################
# Harden & Optimize Apache for Ubuntu 11.10 64bit Web Server #
# by Zach Browne - http://zachbrowne.com #
################################################################
# Update system
aptitude update && aptitude -y safe-upgrade