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
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
#panel {margin-top: 5px; margin-bottom: 5px; } | |
#resulttable{ border: 0 solid #000; background-color: #000;} | |
#resulttable th{ background-color: #000; color: #fff } | |
#resulttable td{ background-color: #fff; border: solid 0px #000; } | |
</style> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script> |
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 | |
function rand_str($length = 32, $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890') | |
{ | |
// Length of character list | |
$chars_length = (strlen($chars) - 1); | |
// Start our string | |
$string = $chars{rand(0, $chars_length)}; | |
// Generate random string |
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 | |
interface Drinkable { | |
//Это можно пить | |
public function drink(); | |
} | |
class Liquid_Exception extends Exception {} | |
//Абстрактный класс Жидкость | |
abstract class Liquid { |
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
class Model_Mapper_Db_User extends Skaya_Model_Mapper_Db_Abstract { | |
public function getUsersPaginator($order = null) { | |
$userTable = self::_getTableByName(self::TABLE_NAME); | |
$select = $userTable->select(); | |
if ($order) { | |
$select->order($this->_mapOrderStatement($order)); | |
} | |
$paginator = Skaya_Paginator::factory($select, 'DbSelect'); | |
$paginator->addFilter(new Zend_Filter_Callback(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
git clone ssh://git@sellcast.com/home/git/repositories/gitosis-admin.git | |
cd gitosis-admin/ | |
nano gitosis.conf | |
---- | |
[group modus] | |
members = vasily@skaya.net victor.gryshko@gmail.com | |
writable = modus | |
---- | |
git add . | |
git commit -am 'Created Modus repo' |
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
pear config-set preferred_state alpha | |
pear upgrade-all | |
pear channel-discover pear.doctrine-project.org | |
pear channel-discover pear.symfony.com | |
pear install doctrine/DoctrineORM-2.2.0BETA2 | |
pear install doctrine/DoctrineMongoDBODM-1.0.0BETA3 |
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
# How to use the cachebuster function when registering styles in your theme's functions.php | |
wp_register_style('style',get_bloginfo('stylesheet_directory').autoVer('style.css'),false,NULL,'all'); | |
/** | |
* Automated cache-buster function via filemtime | |
**/ | |
function autoVer($url){ | |
$name = explode('.',$url); | |
$lastext = array_pop($name); |
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
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
multi_accept on; | |
use epoll; | |
} |
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
dispatch:beforeDispatchLoop | |
dispatch:beforeDispatch | |
dispatch:beforeNotFoundAction | |
dispatch:beforeExecuteRoute | |
dispatch:afterInitialize | |
dispatch:afterExecuteRoute | |
dispatch:afterDispatch | |
dispatch:afterDispatchLoop | |
dispatch:beforeException |
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 | |
use Phalcon\Db\Column; | |
use Phalcon\Db\Index; | |
use Phalcon\Mvc\Model\Migration; | |
class AdsMigration_1010 extends Migration | |
{ | |
const TABLE_NAME = 'ads'; |
OlderNewer