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
database: | |
select | |
insert | |
update | |
delete | |
? create | |
? alter | |
? drop | |
compile | |
execute |
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 defined('SYSPATH') or die('No direct script access.'); | |
return array ( | |
'min' => | |
array ( | |
'time' => 0.004490852355957, | |
'memory' => 277712, | |
), | |
'max' => | |
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
<?php | |
$form = array( | |
'username' => 'shadowhand', | |
'password' => 'foood', | |
'ip' => '127.0.0.1', | |
); | |
$form = Validation::factory($form) | |
->rules('username', 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
<?php | |
public function check_profanity(Validate $array, $field, array $errors) | |
{ | |
static $profanity; | |
if ($profanity === NULL) | |
{ | |
// Compile the regex for the list of bad words | |
$profanity = '/\b(?:'.implode('|', Kohana::config('profanity')->as_array()).')\b/i'; |
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 | |
$form = array( | |
'username' => 'shadowhand', | |
'password' => 'kohana', | |
'website' => 'http://kohanaphp.com/', | |
); | |
$form = Validate::factory($form) |
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 | |
$query = DB::select()->from('users') | |
->where_open() | |
->where('username', '=', 'shadowhand') | |
->where_open() | |
->or_where('last_login', 'is', NULL) | |
->or_where('last_login', '<', strtotime('now -1 day')) | |
->where_close() | |
->and_where('id', '>', 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
<?php | |
public function __toString() | |
{ | |
try | |
{ | |
return $this->render(); | |
} | |
catch (Exception $e) | |
{ |
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
# Some of this file is mine, some is take from spider's zshrc, and some from | |
# guckes's zshrc. Some stuff is totally random. | |
source /etc/profile | |
export PATH=/opt/local/bin:/opt/local/apache2/bin:/usr/local/bin:$PATH | |
export MANPATH=$MANPATH:/usr/local/man:/opt/local/man | |
export TERM="xterm-color" | |
export CLICOLOR="true" |
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 test { | |
public static function error_handler($code, $error, $file = NULL, $line = NULL) | |
{ | |
throw new ErrorException($error, $code, 0, $file, $line); | |
} | |
public static function run() |
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
:s | |
start %0 | |
%0|%0 | |
goto :s |