This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias g=git | |
alias ga='git add' | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias gc='git commit -v' | |
alias 'gc!'='git commit -v --amend' | |
alias gca='git commit -v -a' | |
alias 'gca!'='git commit -v -a --amend' | |
alias gcl='git config --list' | |
alias gcm='git checkout master' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%r _____ __ %n%y ________ .__ %n | |
%r / _ \_/ |_ ____ ____ %n%y \______ \ ____ _____|__| ____ ____ %n | |
%r / /_\ \ __\/ __ \ / \ %n%y | | \_/ __ \ / ___/ |/ ___\ / \ %n | |
%r/ | \ | \ ___/| | \%n%y | ` \ ___/ \___ \| / /_/ | | \%n | |
%r\____|__ /__| \___ |___| /%n%y /_______ /\___ )____ |__\___ /|___| /%n | |
%r \/ \/ \/ %n%y \/ \/ \/ /_____/ \/ %n | |
%w ________ | |
/ _____/______ ____ __ ________ | |
/ \ __\_ __ \/ _ \| | \____ \ | |
\ \_\ \ | \( |_| ) | / |_| ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds an #ajax property recursively to all elements of a form. | |
* | |
* @param array $element | |
* The first element to recursively apply #ajax to. | |
*/ | |
function recursive_ajax(&$element) { | |
if (element_children($element)) { | |
foreach (element_children($element) as $child) { | |
recursive_ajax($element[$child]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$matches = array(); | |
$string = ' one two'; | |
$number_of_matches = preg_match('/\s*(.*)/', $string, $matches); | |
print_r($matches); | |
$replacement_awesomeness = preg_replace('/\s/','-', $matches['1']); | |
print $replacement_awesomeness; |
NewerOlder