Skip to content

Instantly share code, notes, and snippets.

View febbraro's full-sized avatar

Frank Febbraro febbraro

View GitHub Profile
@febbraro
febbraro / user-scrub.sql
Created July 9, 2012 18:26
Cleanup / Obfuscate Drupal Users (sets default password for all users to 'test')
UPDATE users
SET name = CONCAT('user', (select @rownum:=@rownum+1 rownum FROM (SELECT @rownum:=0) r))
WHERE uid > 1;
UPDATE users
SET mail = CONCAT('user', (select @rownum:=@rownum+1 rownum FROM (SELECT @rownum:=0) r), '@example.com')
WHERE uid > 1;
UPDATE users
SET pass = '$S$DR.ROS3sDma71iTWcofZszOb8dMqrPi3PUWWNNc3rIwcG4ikL2gS'
@febbraro
febbraro / Git Completion and Prompt
Created March 24, 2011 03:50
When using git (specifically on OSX installed from homebrew) get some good git command completion and a cool prompt
# Put this in your ~/.bash_profile
# Git command and tag/branch completion as well as putting the branch
# in your prompt including a "*" if it is dirty (changed)
. /usr/local/etc/bash_completion.d/git-completion.bash
export GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\u@\h \[\033[1;33m\]\W\[\033[0m\]$(__git_ps1 "[%s]")\$ '