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
$.fn.extend({ | |
limitText: function(config){ | |
$(this).after('<div id="counter">Limit znaków: <span></span></div>'); | |
var limit = typeof(config.limit) == 'undefined' ? this.attr('maxlength') : config.limit; | |
var counter_hook = typeof(config.counter) == 'undefined' ? '#counter' : config.counter; | |
$(counter_hook).data('value', limit); | |
$(counter_hook).find('span').html(limit); |
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 cms\entity; | |
class Category | |
{ | |
protected $id; | |
protected $left = 0; | |
protected $right = 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 | |
$db = new PDO('mysql:host=localhost;dbname=postfix;charset=utf8', 'root', 'admin'); | |
$stmt = $db->query("SELECT * FROM mail_user"); | |
foreach( $stmt->fetchAll(PDO::FETCH_ASSOC) as $row ) | |
{ | |
$email = $row['email']; | |
$login = explode('@',$email)[0]; | |
$domain = explode('@',$email)[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
$(function(){ | |
$('.arrayToString input[type="checkbox"]').on('click', function(){ | |
var t = $(this); | |
var inputData = $('#' + t.data('input')); | |
var list = inputData.val().split(',').filter(function() { return true; }); | |
var value = t.val(); | |
var elem = list.indexOf(value); | |
if( $(this).prop('checked') ) | |
{ |
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
./configure --prefix=/opt/php/5.5 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-gd --with-pgsql=/usr/lib/postgresql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=lib --enable-ftp --with-imap=/usr/local/imap-2007f --with-imap-ssl --with-kerberos --with-gettext --with-xsl --enable-fpm --enable-opcache |
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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerAdmin webmaster@zencode.pl | |
DocumentRoot "/Users/sbl/www" | |
ServerName localhost | |
ServerAlias localhost | |
ErrorLog "/Users/sbl/www/logs/error.log" | |
CustomLog "/Users/sbl/www/logs/access.log" common |
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
{% block collection_widget %} | |
{% spaceless %} | |
<div class="collection"> | |
{% if prototype is defined %} | |
{% set attr = attr|merge({'data-prototype': block('collection_item_widget') }) %} | |
{% endif %} | |
<div {{ block('widget_container_attributes') }}> | |
{{ form_errors(form) }} | |
<ul> | |
{% for rows in 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
server { | |
listen 80; | |
# Server name being used (exact name, wildcards or regular expression) | |
server_name mysite.com; | |
client_max_body_size 20M; | |
# Document root, make sure this points to your Symfony2 /web directory | |
root /home/user/sites/mysite.com/web; |
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 validate selectize.js comboboxes with the jQuery validation plugin | |
//selectize.js: http://brianreavis.github.io/selectize.js/ (brianreavis/selectize.js) | |
//http://jqueryvalidation.org (jzaefferer/jquery-validation) | |
//configure jquery validation | |
$("#commentForm").validate({ | |
//the default ignore selector is ':hidden', the following selectors restore the default behaviour when using selectize.js | |
//:hidden:not([class~=selectized]) | selects all hidden elements, but not the original selects/inputs hidden by selectize | |
//:hidden > .selectized | to restore the behaviour of the default selector, the original selects/inputs are only validated if their parent is visible | |
//.selectize-control .selectize-input input | this rule is not really necessary, but ensures that the temporary inputs created by selectize on the fly are never validated |
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
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
[isamchk] | |
key_buffer = 16M | |
[mysqld] | |
basedir = /usr | |
datadir = /var/lib/mysql |
OlderNewer