sudo nano /etc/apt/sources.list
add to end file
deb http://www.rabbitmq.com/debian/ testing main
add public key
<?php | |
# http://seyferseed.ru/ru/php/kastomnaya-strategiya-gerenatsii-id-v-doctrine-2.html#sthash.r0n7nj05.dpbs | |
print 'orig: 581a8775b67e88-ca53-8b4568' . PHP_EOL; | |
print 'comp: ' . uniqid('', false) . dechex(mt_rand(0, 0xF)) . '-' . dechex(getmypid()) . '-' . dechex(mt_rand(0, 0xFFFFFF)) . PHP_EOL; |
#!/usr/bin/env python | |
# | |
# Vkontatke OAuth 2.0 wrapper | |
# Copyright 2011, Adil Khashtamov [adil.khashtamov@gmail.com] | |
# http://khashtamov.kz | |
# | |
# | |
import logging |
#!/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 |
/** | |
* Configured View for jQGrig | |
* @author: Nikolay Ermin <keltanas@gmail.com> | |
*/ | |
define("Keltanas/GridView", [ | |
"jquery", | |
"underscore", | |
"backbone", | |
"jqgrid/jquery.jqGrid" | |
], function ($, _, Backbone) { |
<?php | |
use Money\Money; | |
/** | |
* Class VatCalculatingService | |
* Calculating VAT | |
* | |
* @see: http://www.achievertalk.com/achievertalkwp/2011/06/vat-in-your-young-enterprise-company/ | |
*/ | |
class VatCalculatingService |
<?php | |
namespace Linkofy\CommonBundle\Menu; | |
use Knp\Menu\FactoryInterface; | |
use Symfony\Component\DependencyInjection\ContainerAware; | |
class Builder extends ContainerAware | |
{ | |
public function mainMenu(FactoryInterface $factory, array $options) |
Это вставить например, в "верхняя часть сайта" | |
<a href="#" id="blind">Версия</a> | |
<script> | |
$(function(){ | |
$('#blind') // ссылается на <a href="#" id="blind"></a> | |
.click(function(){ | |
$('body').toggleClass('blind'); | |
return false; |
A list of amazingly awesome PHP libraries, resources and shiny things.
// Шаг 1 | |
function(){} // объявляем анонимную функцию | |
// Шаг 2 | |
(function(){})(); // - объявляем и запускаем анонимную функцию | |
// Шаг 3 | |
(function($){ |