This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
<?php | |
/* | |
* Outputs a color (#000000) based Text input | |
* | |
* @param $text String of text | |
* @param $min_brightness Integer between 0 and 100 | |
* @param $spec Integer between 2-10, determines how unique each color will be | |
*/ | |
function genColorCodeFromText($text,$min_brightness=100,$spec=10) |
{ | |
"cmd": ["php", "$file"], | |
"selector": "source.php", | |
"target": "exec", | |
"variants": [ | |
{ "cmd": ["/usr/local/php5/bin/phpunit", "$file"], | |
"name": "Run" | |
} | |
] | |
} |
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" } |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
/* | |
Assuming you have an SQL file (or string) you want to run as part of the migration, which has a number of statements... | |
CI migration only allows you to run one statement at a time. If the SQL is generated, it's annoying to split it up and create separate statements. | |
This small script splits the statements allowing you to run them all in one go. | |
*/ | |
$sqls = explode(';', $sql); | |
array_pop($sqls); | |
foreach($sqls as $statement){ |
/* | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ | |
(function() { |
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
# Piece-by-Piece Explanation: | |
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
# the $PROMPT_COMMAND environment variable is executed every time a command is run | |
# see: ss64.com/bash/syntax-prompt.html |
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |