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 | |
/** | |
* Converts a linear array to its associative equivalent. | |
* | |
* @param $array | |
* Linear array to process. | |
* @param $function | |
* Callback name to call against each value. | |
* | |
* @return array |
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
/** | |
* Debug helper similar to PHP's print_r(). | |
* | |
* This function was inspired by the print_r function of PHP. | |
* This will accept some data as the argument and return a | |
* text that will be a more readable version of the | |
* array/hash/object that is given. | |
* | |
* @param data | |
* array, object or hash (assoc array) |
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
[ | |
{ "keys": ["ctrl+super+a"], "command": "alignment" }, | |
{ "keys": ["ctrl+super+f"], "command": "reindent", "args": {"single_line": false}}, | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" }, | |
{ "keys": ["super+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }, | |
] |
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
svn st | grep '^!' | awk '{print $2}' | xargs svn delete --force |
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 | |
/** | |
* Parses CSV file into an associative array with the first row as field names. | |
* | |
* @param string $filepath Path to readable CSV file. | |
* @param array $options Parse options (eol, delimiter, enclosure, escape, to_object). | |
* | |
* @return array Associative array of parsed CSV file. | |
*/ |
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 | |
/** | |
* Recursively removes a directory. | |
* | |
* @param string $path Directory path to remove. | |
* @param bool $suicide Whether to remove itself or not. | |
* | |
* @return void | |
*/ |
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
#Header | |
%KeyInit() | |
%Param.AvoidPluginCleanUp() | |
%Common.SetPriority(140) | |
%Graph.SetTextArea(0,0,255,31) | |
%Graph.Font('OCR-A',10,1) | |
%DefVar(xPos,Local=105) | |
%DefVar(yPos,Local=16) | |
%DefVar(an=0) | |
%DefVar(km,Global) |
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 | |
/** | |
* Calculates how many months is past between two timestamps. | |
* | |
* @param int $start Start timestamp. | |
* @param int $end Optional end timestamp. | |
* | |
* @return int | |
*/ |
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 | |
/** | |
* Case-insensitive in_array() wrapper. | |
* | |
* @param mixed $needle Value to seek. | |
* @param array $haystack Array to seek in. | |
* | |
* @return bool | |
*/ |
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 | |
/** | |
* Truncates string to the specified length. | |
* | |
* @param string $string String to truncate. | |
* @param integer $len Desired length. | |
* @param boolean $wordsafe Whether to truncate on word boundries or not. | |
* @param boolean $dots Whether to add dots or not. | |
* |