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 | |
| namespace MyNamespace; | |
| use Symfony\Component\HttpKernel\Bundle\Bundle; | |
| use Doctrine\DBAL\Types\Type; | |
| class DataBundle extends Bundle | |
| { | |
| /** |
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 | |
| use InvalidArgumentException; | |
| use ReflectionClass; | |
| /** | |
| * Base Enum class | |
| * Require PHP >= 5.3 | |
| * | |
| * @author Ton Sharp <66ton99@gmail.com> |
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
| #!/bin/sh | |
| prefix="/home/mail" | |
| numPath="$prefix/.num" | |
| if [ ! -f $numPath ]; then | |
| echo "0" > $numPath | |
| chmod 0777 $numPath | |
| fi | |
| num=`cat $numPath` | |
| num=$(($num + 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
| <?php | |
| class Handler | |
| { | |
| protected $next; | |
| protected $id; | |
| protected $limit; | |
| public function getLimit() | |
| { |
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
| #! /bin/bash | |
| ifconfig | |
| echo | |
| echo Gateway" "Interface | |
| route -n | awk '/UG/ {printf "%-21s %s\n",$2,$8}' | |
| echo | |
| echo DNS Servers | |
| awk '/nameserver/ {print $2}' /etc/resolv.conf | |
| echo |
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
| /** | |
| * Add hash to url without scrolling | |
| * | |
| * @param String $url - it could be hash or url with hash | |
| * | |
| * @return void | |
| */ | |
| function addHashToUrl($url) | |
| { | |
| if ('' == $url || undefined == $url) { |
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 | |
| /** | |
| * Amazon SQS Queue | |
| * | |
| * @author Ton Sharp <Forma-PRO@66ton99.org.ua> | |
| */ | |
| class Zend_Queue_Adapter_AmazonSQS extends Zend_Queue_Adapter_AdapterAbstract | |
| { |
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 | |
| /** | |
| * Memory Swift maller transport for unit tests | |
| * | |
| * @package Lib | |
| * @subpackage Swift | |
| * @author Ton Sharp <forma@66ton99.org.ua> | |
| */ | |
| class Swift_MemTransport implements Swift_Transport |
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
| delimiter $$ | |
| create procedure drop_tables_like(pattern varchar(255), db varchar(255)) | |
| begin | |
| select @str_tables:=group_concat(table_name) | |
| from information_schema.tables | |
| where table_schema=db and table_name like pattern; | |
| IF @str_tables IS NOT NULL THEN | |
| SET @str_sql := concat('drop table ', @str_tables); | |
| prepare stmt from @str_sql; |
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
| (['"A-z\)])(?!;) ?\?> | |
| $1;?> |
OlderNewer