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 | |
/** | |
* class to load the handlers as callbacks for the given events/tags | |
* @author musaid <[email protected]> | |
* @version v0.1 | |
* | |
* usage: | |
* $handle = new HandlerLoader(); | |
* var_dump($handle->getHandlers('/var/www/crawler/folder/')); |
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 | |
/** | |
* @name MyClass | |
* @tags handler, denormalizer, | |
* some | |
* @param some-param | |
* @return return-param | |
*/ |
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 | |
$touched = array( | |
'pidone' => array('ref' => 'somerefno', 'tries' => 1, 'timestamp' => 1350111444), | |
'pidtwo' => array('ref' => 'anotherrefno', 'tries' => 2, 'timestamp' => 1350111527) | |
); | |
$pid = 'pidtwo'; | |
$ref = 'refthree'; | |
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 | |
// register Pheanstalk class loader | |
require_once('pheanstalk/pheanstalk_init.php'); | |
$pheanstalk = new Pheanstalk('localhost'); | |
$pheanstalk | |
->watch('touched') | |
->ignore('default'); | |
$touched = array(); |
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
SAMPLE OUTPUT | |
WITHOUT TAGS | |
array | |
'Allied\Fun' => | |
array | |
0 => string '$anonymous' (length=10) | |
'Allied\Some\Event' => | |
array |
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 | |
/** | |
* Allied PDF - A Class to print the policy documents as PDF files from the relevant data | |
* | |
* @usage Please refer to the associated documentation and/or the inline documentation | |
* @author musaid <[email protected]> | |
* @version v0.1 | |
*/ | |
// path to the fpdf library |
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
#include <stdio.h> | |
int main() | |
{ | |
int i; | |
for (i=1; i<101; i++) | |
((i%5==0 && i%3==0) ? printf("FizzBuzz\n") : ((i%5==0) ? printf("Buzz\n") : ((i%3==0) ? printf("Fizz\n") : printf("%d\n", i)))); | |
return 0; | |
} |
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
# ZSH Theme by musaid ([email protected]) [http://github.com/musaid] | |
# FOR PERSONAL USE ONLY | |
ZSH_THEME_GIT_PROMPT_PREFIX="❴ git:" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="❵%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✘ " | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}✔ " | |
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}✚ " | |
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%}✹ " |
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
" Musaid's standard settings for VIM | |
" Author: musaid ([email protected]) [http://github.com/musaid] | |
" Version: 1.0 | |
" Smart tabbing / autoindenting | |
set undolevels=200 | |
set nocompatible | |
set autoindent | |
set smarttab |
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
/** | |
* Determine if two associative arrays are similar | |
* | |
* Both arrays must have the same indexes with identical values | |
* without respect to key ordering | |
* | |
* @param array $a | |
* @param array $b | |
* @return bool | |
*/ |
OlderNewer