Skip to content

Instantly share code, notes, and snippets.

View jwhitcraft's full-sized avatar
🏠
Working from home (always)

Jon Whitcraft jwhitcraft

🏠
Working from home (always)
View GitHub Profile
@jwhitcraft
jwhitcraft / JustATest.php
Created November 22, 2010 20:31
Just A Test
<?php
phpinfo();
@jwhitcraft
jwhitcraft / bash_prompt.sh
Created November 30, 2010 15:12
When Inside a git working directory put the current branch on your bash prompt
# You just add this to your .bash_profile inside your home dir.
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\]"
<?php
$dictionary['<module name>']['fields']['<hidden field>']['dependency'] = 'equal($<trigger field>, "<trigger field value>")';
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\]"
local LIGHT_GREEN="\[\033[1;32m\]"
<?php
/**
* @params
* Order
* Label
* Class Path
* Class Name
* Class Method
*/
$hook_array['before_save'][] = Array(1, 'label1', 'custom/modules/Notes/customPortalLogic.php', 'NoteCustomPortal', 'sendUpdates');
<?php
class MyAccountLogicHook extends SugarLogicHook
{
public function before_save(&$bean, $arguments)
{
// code here
}
}
<?php
$hook_array['before_save'][] = Array('custom/modules/Notes/customPortalLogic.php', 'NoteCustomPortal');
> git remote add zf2 http://github.com/zendframework/zf2
> git fetch zf2
> git checkout -b projects/zf2 zf2/master
> git subtree split --prefix=library/Zend/Log --annotate="[zend_log] " --rejoin -b subtrees/zend_log