This file contains hidden or 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 hidden or 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 hidden or 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 [email protected] | |
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
$factory = $this->get('security.encoder_factory'); | |
$encoder = $factory->getEncoder($user); | |
$password = $encoder->encodePassword(TUTAJ_HASLO, TUTAJ_SALT); |
This file contains hidden or 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 | |
$menu_name = 'main-primary-menu'; | |
$locations = get_nav_menu_locations(); | |
$menu = wp_get_nav_menu_object( 45 ); //wpisane na sztywno ID lokalizacji menu | |
$menu_items = wp_get_nav_menu_items($menu->term_id); | |
echo '<ul id="menu-'.$menu_name.'">'; | |
echo '<li class="current_page_item"><a href="'.get_bloginfo('url').'">Strona Główna</a></li>'; | |
foreach ( (array) $menu_items as $key => $menu_item ) |
NewerOlder