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
| usage: | |
| cd /my/svn/repo | |
| ./path/to/svn2git-authors.sh > authors.txt |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <project name="Webads"> | |
| <!--This target runs the phpcs--> | |
| <target name="phpcs"> | |
| <!--unix--> | |
| <exec dir="${basedir}" executable="phpcs" failonerror="false" osfamily="unix"> | |
| <arg line="--standard=Cake --extensions=php,module,inc ${basedir}"/> | |
| </exec> | |
| </target> |
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 is_prime_overkill($int){ | |
| static $ints; | |
| if(!$ints){ | |
| //quick skips | |
| $ints = array(0=>false, 1=>false, 2=>true, 3=>true, 4=>false, 5=>true); | |
| } | |
| $index = strval($int); | |
| if(!isset($ints[$index])){ | |
| $ints[$index] = true; |
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 daterange_range($starttime, $endtime = null) { | |
| $return = ""; | |
| //set the endtime to the start time if there isn't an endtime provided | |
| $endtime = empty($endtime) ? $starttime : $endtime; | |
| //turn them into timestamps if they are not timestamps already | |
| $endtime = ((int)$endtime == $endtime && is_int($endtime))? $endtime:strtotime($endtime); | |
| $starttime = ((int)$starttime == $starttime && is_int($starttime))? $starttime:strtotime($starttime); | |
| //boolean values to prevent test duplication, |
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
| @font-face{ | |
| font-family:'CodenameCoderFree4FBold'; | |
| src:url('/fonts/codenamecoderfree4f-bold-webfont.eot'); | |
| src:url('/fonts/codenamecoderfree4f-bold-webfont.eot?iefix') format('eot'), | |
| url('/fonts/codenamecoderfree4f-bold-webfont.woff') format('woff'), | |
| url('/fonts/codenamecoderfree4f-bold-webfont.ttf') format('truetype'), | |
| url('/fonts/codenamecoderfree4f-bold-webfont.svg#webfont9UM32sTt') format('svg'); | |
| font-weight:normal; | |
| font-style:normal; | |
| } |
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
| //-- Action Script 2 version: | |
| //this is the click tag action | |
| //that should be attached to your button | |
| on (release){ | |
| getURL (_root.clickTAG, "_blank"); | |
| } | |
| //-- Action Script 3 version: |
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 | |
| /** | |
| * @property int $id An identifier | |
| * @property string $name A name | |
| */ | |
| class parent_class{ | |
| protected $_data = array(); | |
| /** | |
| * magic function __get |
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 Fibonacci_Sequence implements Iterator { | |
| private $start; | |
| public function __construct($start=0){ | |
| $this->start = $start; | |
| } | |
| public function current() { | |
| return round( | |
| (pow(((1 + sqrt(5)) / 2), $this->key) - pow((-1 / (1 + sqrt(5)) / 2), $this->key)) / sqrt(5) |
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 | |
| /** | |
| * Starting with an answer, generate a math question to get the result | |
| * @param int $answer Your desired answer | |
| * @return string The equation to arrive at that answer | |
| */ | |
| function generate_simple_math($answer){ | |
| $operations = 2; | |
| $min_number = 1; |
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
| <!-- for the love of god... stop doing this! --> | |
| <!-- the alternating order pattern is aesthetically pleasing though... --> | |
| <img src="/images/spacer.gif" width="575" height="3" /><br /> | |
| <img src="/images/bn_btm.gif" height="3" width="575" /><br /> | |
| <img src="/images/bn_btm.gif" height="3" width="575" /><br /> | |
| <img src="/images/spacer.gif" width="575" height="3" /><br /> |