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
| #!/bin/bash | |
| # make sure you switch to php70 | |
| brew unlink php56 && brew link php70 | |
| # checkout and build | |
| git clone git@github.com:krakjoe/apcu | |
| cd apcu | |
| make clean |
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
| {% use "form_div_layout.html.twig" %} | |
| {# Widgets #} | |
| {% block form_widget_simple -%} | |
| {% if type is not defined or 'file' != type %} | |
| {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} | |
| {% endif %} | |
| {{- parent() -}} | |
| {%- endblock form_widget_simple %} |
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
| {% use "web:Form:bootstrap_4_layout.html.twig" %} | |
| {# Labels #} | |
| {% block form_label -%} | |
| {% if label is same as(false) %} | |
| <div class="{{ block('form_label_class') }}"></div> | |
| {% else %} | |
| {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) %} | |
| {{- parent() -}} |
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 | |
| /** | |
| * Create a web friendly URL slug from a string. | |
| * | |
| * Although supported, transliteration is discouraged because | |
| * 1) most web browsers support UTF-8 characters in URLs | |
| * 2) transliteration causes a loss of information | |
| * | |
| * @author Sean Murphy <sean@iamseanmurphy.com> | |
| * @copyright Copyright 2012 Sean Murphy. All rights reserved. |
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 | |
| # Flatten array and modify it's value | |
| # [[1, 2, 3, 4, [3, 4]] => [1, 2, 3, 4, 3, 4] | |
| # php ./script.php to test | |
| $total = 30000; | |
| $mockData = []; | |
| for($i = 1; $i < $total; $i++) { |
OlderNewer