Skip to content

Instantly share code, notes, and snippets.

Avatar

Konstantin Pereiaslov perk11

View GitHub Profile
View Dockerfile
FROM php:7-fpm
# Install modules
RUN apt-get update && apt-get install -y \
libmcrypt-dev \
libicu-dev \
&& docker-php-ext-install iconv \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-install intl \
&& docker-php-ext-install opcache \
&& docker-php-ext-install mbstring
View package_mailcatcher.sh
apt-get install ruby2.0 ruby2.0-dev ruby-ffi libsqlite3-dev git ca-certificates nodejs build-essential
gem2.0 install bundler rake fpm
git clone https://github.com/sj26/mailcatcher.git
cd mailcatcher
bundle install
bundle exec rake assets
bundle exec rake package
gem2.0 install --conservative mailcatcher-0.6.4.gem --no-ri --no-rdoc --install-dir /tmp/gems
mkdir packages
View php-no-xdebug.sh
#!/bin/sh
temporaryPath="$(mktemp -t php-no-debug.XXXX)"
find /etc/php5/cli/php.ini /etc/php5/cli/conf.d/*.ini ! -name 20-xdebug.ini | xargs cat > "$temporaryPath"
/usr/bin/php -n -c "$temporaryPath" "$@"
rm -f "$temporaryPath"
View 1.twig
{% block checkbox_radio_label %}
{# Do not display the label if widget is not defined in order to prevent double label rendering #}
{% if widget is defined %}
{% if required %}
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %}
{% endif %}
{% if parent_label_class is defined %}
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %}
{% endif %}
{% if label is not sameas(false) and label is empty %}
You can’t perform that action at this time.