function parse_git_branch_and_add_brackets {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\[\1\]/'
}
PS1="\e[0;35m: \w\e[m \n\h:\u \[\033[0;32m\]\$(parse_git_branch_and_add_brackets)\[\033[0m\]\$ "
This file contains hidden or 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 | |
| function createBulkInsertSql($sql, $rowCount, $columnSize = 1) { | |
| $rowCount = intval($rowCount); | |
| $columnSize = intval($columnSize); | |
| $columnMarker = array_fill(0, $columnSize, '?'); | |
| $rowValues = array_fill(0, $rowCount, '(' . implode(',', $columnMarker) . ')'); | |
| $sql .= ' VALUES' . implode(',', $rowValues); | |
| return $sql; | |
| } |
This file contains hidden or 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 | |
| use Behat\Behat\Context\BehatContext; | |
| require_once 'RestContext.php'; | |
| /** | |
| * Features context. | |
| */ | |
| class FeatureContext extends BehatContext |
This file contains hidden or 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
| ab -n 1000 -c 10 http://localhost/slim.php > slim.log | |
| ab -n 1000 -c 10 http://localhost/phalcon.php > phalcon.log |
This file contains hidden or 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
| function mood() | |
| { | |
| cmd=". $HOME/.env/$1/bin/activate" | |
| $cmd | |
| } | |
| _mood() | |
| { | |
| local cur="${COMP_WORDS[COMP_CWORD]}" | |
| local projects=$(ls -h $HOME/.env) |
This file contains hidden or 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
| package com.risenlabs; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.List; | |
| import java.util.Map; | |
| import org.apache.commons.io.FileUtils; | |
| import org.hibernate.SessionFactory; | |
| import org.hibernate.cfg.Configuration; |
This file contains hidden or 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
| package com.tutorial.client; | |
| import static org.junit.Assert.assertTrue; | |
| import org.hibernate.SessionFactory; | |
| import org.hibernate.cfg.Configuration; | |
| import org.junit.Test; | |
| import com.tutorial.auth.model.User; | |
| import com.tutorial.client.model.UserInfo; |
This file contains hidden or 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
| package com.example.navigationstyle; | |
| import android.app.Activity; | |
| import android.graphics.Typeface; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.view.View.OnClickListener; | |
| import android.widget.Button; | |
| public class MainActivity extends Activity implements OnClickListener { |
This file contains hidden or 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
| autocmd FileType php noremap <C-L> :!/Applications/MAMP/bin/php/php5.3.6/bin/php -l %<CR> | |
| autocmd FileType php noremap <C-M> :w!<CR>:!/Applications/MAMP/bin/php/php5.3.6/bin/php %<CR> |
This file contains hidden or 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
| " Map NERDTree to \p | |
| nmap <silent> <Leader>p :NERDTreeToggle<CR> | |
| " Show line number | |
| set number | |
| " Syntax on | |
| syntax on | |
| " Incremental search |