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 | |
class Handler | |
{ | |
protected $next; | |
protected $id; | |
protected $limit; | |
public function getLimit() | |
{ |
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
#!/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 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 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 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 <[email protected]> | |
*/ | |
class Zend_Queue_Adapter_AmazonSQS extends Zend_Queue_Adapter_AdapterAbstract | |
{ |
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 | |
/** | |
* Memory Swift maller transport for unit tests | |
* | |
* @package Lib | |
* @subpackage Swift | |
* @author Ton Sharp <[email protected]> | |
*/ | |
class Swift_MemTransport implements Swift_Transport |
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
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 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;?> |
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
-- Server version 5.5.20 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; | |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | |
/*!40103 SET TIME_ZONE='+00:00' */; | |
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | |
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; |
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 | |
namespace MyNamespace; | |
/** | |
* @author Ton Sharp <[email protected]> | |
*/ | |
class DateTime extends \DateTime | |
{ | |
/** | |
* @param int|null $year |
OlderNewer