sudo nano /etc/apt/sources.list
add to end file
deb http://www.rabbitmq.com/debian/ testing main
add public key
<?php | |
set_include_path($_SERVER['DOCUMENT_ROOT']); | |
require_once 'engine.php'; | |
// подключаем библиотеку | |
require_once('tcpdf/config/lang/rus.php'); | |
require_once('tcpdf/tcpdf.php'); | |
//require_once('../class/imo_account_pdf.php'); |
for ( n=1; n<=3; n++ ){ | |
$.get( url, $.proxy( function( n, data ){ | |
console.log(arguments, n, data); | |
}, n)); | |
} |
<?php | |
/** | |
* Gravatar request example | |
* @author Nikolay Ermin <nikolay@ermin.ru> | |
* @link http://siteforever.ru | |
*/ | |
function exception_error_handler($errno, $errstr, $errfile, $errline ) { | |
throw new ErrorException($errstr, 0, $errno, $errfile, $errline); | |
} |
<?php | |
//... | |
function settingCONF_BYCOUNTRY_BYZONE_FORM($module_id) | |
{ | |
$curr_country = isset($_POST["shipping_module_bycountry_byzone_country"]) ? $_POST["shipping_module_bycountry_byzone_country"] : 0; | |
$curr_country = (int) $curr_country; | |
if(!$curr_country){ | |
$curr_country = xGetData('SXshipping_module_bycountry_byzone_country'.$module_id); |
<?php | |
// <= PHP 5.2 | |
$cities = array_filter($cities,create_function('$v','return count($v);')); | |
// >= PHP 5.3 | |
$cities = array_filter($cities,function($v){return count($v);}); | |
// VS |
<?php | |
class test | |
{ | |
public function do_test() | |
{ | |
return function() { | |
return $this; | |
}; | |
} | |
} |
/** | |
* Configured View for jQGrig | |
* @author: Nikolay Ermin <keltanas@gmail.com> | |
*/ | |
define("Keltanas/GridView", [ | |
"jquery", | |
"underscore", | |
"backbone", | |
"jqgrid/jquery.jqGrid" | |
], function ($, _, Backbone) { |
#!/bin/sh | |
# /etc/init.d/teamcity - startup script for teamcity | |
export TEAMCITY_DATA_PATH="/home/keltanas/.BuildServer" | |
#sudo -u keltanas | |
case $1 in | |
start) | |
echo "Starting Team City" | |
start-stop-daemon --start -c keltanas --exec /opt/TeamCity/bin/runAll.sh start |
__author__ = 'keltanas' | |
class closure: | |
def get_me(self): | |
return lambda : self | |
inst_test = closure() | |
me = inst_test.get_me() | |
del inst_test |