Skip to content

Instantly share code, notes, and snippets.

View taz77's full-sized avatar
🚵‍♂️
Playing

Brady taz77

🚵‍♂️
Playing
View GitHub Profile
@taz77
taz77 / bash_profile
Created February 11, 2012 18:19
Color Bash Prompt with Git Branch Information
# Set git autocompletion and PS1 integration
if [ -f /usr/share/doc/git-1.7.7.6/contrib/completion/git-completion.bash ]; then
. /usr/share/doc/git-1.7.7.6/contrib/completion/git-completion.bash
fi
GIT_PS1_SHOWDIRTYSTATE=true
PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '
@taz77
taz77 / template.php
Created May 18, 2012 13:01
Drupal Breadcrumbs customization within template.php
<?php
function YOURTHEMENAME_breadcrumb($variables) {
$breadcrumb = $variables['breadcrumb'];
$crumbs = '';
$sep = ' &gt; ';
if (!empty($breadcrumb)) {
$crumbs = '<div id="breadcrumbs">';
foreach ($breadcrumb as $value) {
$crumbs .= $value . $sep;
@taz77
taz77 / gist:a5b45369ea86e2f9786d294bc906137d
Created December 17, 2016 12:58 — forked from sebsto/gist:19b99f1fa1f32cae5d00
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@taz77
taz77 / exportMySQLUsersPDO.php
Last active November 3, 2019 15:46 — forked from zaiddabaeen/exportMySQLUsersPDO.php
Exports MySQL Users and Privileges using PDO
<?php
# vim:sts=4:sw=4
/*
* Feel free to improve it.
* Original by Janich: https://gist.github.com/janich/6121771
*
* @requires PHP 5.3+ MySQL 5.6+
* @package ExportMySQLUsers
* @author Zaid Daba'een
* @license http://www.dbad-license.org/ DBAD license