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 | |
| public static function getAllFlat($pk = null, $pv = null) | |
| { | |
| if(!$pv) | |
| { | |
| $pv = self::$data; | |
| } | |
| foreach($pv as $k1 => $v1) | |
| { |
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
| function initFixFlash(){ | |
| embed = ''; | |
| holder = ''; | |
| flash = ''; | |
| jQuery('object').each(function(){ | |
| jQuery(this).append('<param value="transparent" name="wmode"/>'); | |
| embed = jQuery(this).find('embed'); | |
| if (embed != undefined) { | |
| jQuery(this).attr('data', embed.attr('src')); |
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 mod in `git submodule status | awk '{ print $2 }'`; do git config -f .git/config submodule.${mod}.url `git config -f .gitmodules --get submodule.${mod}.url` && echo Synced $mod; done && git submodule -q sync && git submodule -q update && git clean -q -d -x -f; |
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 | |
| /** | |
| * a feature enabling class | |
| * | |
| * This class has a few methods for enabling or disabling chunks of code. | |
| * It also provides enabling based on user buckets. Most methods are just static. | |
| * | |
| * @author Paul Thrasher | |
| * |
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 | |
| $test = array(1,2,3,4,5,6,7,8,9,0); | |
| $find = 4; | |
| foreach($test as $t){ | |
| echo $t.','; | |
| if($t=='4' && $find==4){ | |
| echo 'found!,'; | |
| $find = 6; | |
| reset($test); | |
| } |
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 | |
| /** | |
| * A class wrapper for PECL Libevent [http://www.php.net/manual/en/book.libevent.php] | |
| * @author Paul Thrasher [http://paulthrasher.com/] 1/17/11 | |
| **/ | |
| /** | |
| * // an example func that just exits | |
| * function handler_func($fd, $events, $arg){ $arg[1]->loopexit(); }; |
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 dColors{ | |
| CONST WHITE = "#FFFFFF"; | |
| CONST BLACK = "#000000"; | |
| CONST RED = "#FF0000"; | |
| CONST GREEN = "#00FF00"; | |
| CONST BLUE = "#0000FF"; |
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
| 'width': 460, 'height': 460, 'method': 'scaleAndCrop', 'allowUpscale': false}) }}"/> | |
| 'width': 460, 'height': 460, 'method': 'scaleAndCrop', 'allowUpscale': false}) }}"/> | |
| 'width':620, 'height':380, 'method': 'crop'}) }}" alt="" /> | |
| 'width': 140, 'height': 120, 'method': 'scaleAndCrop', 'allowUpscale': true}) }}" alt="{{ article.promo_title|raw }}" /> | |
| 'width':220, 'height':180, 'method': 'scaleAndCrop', 'allowUpscale': true}) }}" alt="" /> | |
| 'width': 122, 'height': 72, 'method': 'scaleAndCrop'}) }}"/> | |
| 'width': 134, 'height': 134, 'method': 'scaleAndCrop', 'allowUpscale': true}) }}"/> | |
| 'width':424, 'height':200, 'method': 'scaleAndCrop'}) }}" alt="" /> | |
| 'width':50, 'height':50, 'method': 'scaleAndCrop', 'allowUpscale': true}) }}" alt="" /></span> | |
| 'width': 134, 'height': 134, 'method': 'scaleAndCrop', 'allowUpscale': 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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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 | |
| // Usage: | |
| // $master=new WebSocket("localhost",12345); | |
| // $master->callback = function($self, $user, $msg){ | |
| // $self->send($user->socket,$msg); | |
| // }; | |
| require "CommandsAppBase.class.php"; | |
| require "WsRequest.class.php"; |