#split window horizontally ⌘ + d
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
forms | Formulär | |
---|---|---|
add_form_component | Lägg till formulärdel | |
save_only_scheduled_tasks | Spara endast schemaläggningar | |
minify_javascript_algorithm | Javascript minification algorithm | |
modified_assets | Ändrade Assets | |
modification_statistic | Förändringar under de senaste 31 dagarna | |
minify_javascript | Minify Javascript | |
minify_css | Minify CSS | |
content | Innehåll | |
slider_settings | Slider Settings |
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 | |
$c = new Zend_Http_Client('http://php.net/quickref.php'); | |
echo substr_count($c->request()->getBody(), 'function.'); // 5468 today, 4th of October 2010 |
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
"search for "bla": | |
/bla | |
"replace "bla" with "blue" throughout file: | |
:%s/bla/blue/g | |
"replace "bla" with "blue" throughout visual selection: | |
:'<,'>s/bla/blue/g | |
"go to line 51 |
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
# Prerequisites: git installed, account at github.com | |
# This demo is performed at a mac | |
git clone https://github.com/mattn/gist-vim.git ~/ # get the gist plugin for vim | |
cp ~/gist-vim/plugin/gist.vim ~/.vim/plugin/ # place the plugin where it belongs | |
git config --global github.user <user> # replace <user> with your github username | |
git config --global github.token <token> # replace <token> with token found in github > account settings > account admin | |
# try it out |
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
#!/usr/bin/php | |
<?php | |
// copied from http://phpadvent.org/2008/dont-commit-that-error-by-travis-swicegood | |
// authored by Travis Swicegood | |
$output = array(); | |
$return = 0; | |
exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return); | |
$against = $return == 0 ? 'HEAD' : '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; |
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 | |
$words = array( | |
'omg' => 'Oh my god', | |
'BRB' => 'Be right back' | |
); | |
require 'Hz/Filter/Acronym.php'; | |
$filter = new Hz_Filter_Acronym($words); |
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 tail_php="clear;date;tail -f /var/log/apache2/error.log -n 0" |
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
grep -l match_against in_files # -l only lists filenames | |
ls -1 # filenames STDIN ready | |
ls -x # space separated filenames | |
git show HEAD~1:index.html # what did I just commit? | |
git checkout HEAD~1 index.html # regret one file of a commit, not a complete rollback |
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
#from http://www.jonmaddox.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" |
OlderNewer