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 | |
| APP=$1 | |
| hk create -r eu $APP-static-se7ensky | |
| hk set -a $APP-static-se7ensky BUILDPACK_URL=https://github.com/Se7enSky/heroku-buildpack-verstat.git | |
| hk access-add -a $APP-static-se7ensky [email protected] |
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 | |
| set -e | |
| if [ "$PHP_VERSION" == "" ]; then | |
| echo "must set PHP_VERSION, i.e PHP_VERSION=5.5.14" | |
| exit 1 | |
| fi | |
| if [ "$UPLOAD_TO" == "" ]; then |
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 | |
| set -e | |
| if [ "$NGINX_VERSION" == "" ]; then | |
| echo "must set NGINX_VERSION, i.e NGINX_VERSION=1.7.3" | |
| exit 1 | |
| fi | |
| if [ "$UPLOAD_TO" == "" ]; then |
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 | |
| /* | |
| * tr – translation helper | |
| * examples: | |
| * tr("Hello") -> "Привіт" // simply translates given string | |
| * tr("%s products", $category) -> "Продукти категорії " // translates format and uses sprintf for substitutions | |
| * tr(array("%d comment", "%d comments"), $commentCount) -> "1 comment" // pluralized format version | |
| */ | |
| function tr() { |
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 | |
| URLS_FILE=$1 | |
| while read URL; do | |
| TIME=`curl --silent -w '%{time_total}' -o /dev/null $URL` | |
| echo "${TIME}s $URL" | |
| done <$URLS_FILE |
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 | |
| error_reporting(E_NONE); | |
| $cnt = 100; | |
| $t1 = microtime(true); | |
| $a = 4; | |
| for ($i=1; $i<=$cnt; $i++) { if ($a) { 1+1; } } | |
| $t2 = microtime(true); | |
| unset($a); | |
| for ($i=1; $i<=$cnt; $i++) { if ($a) { 1+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
| {"s":1,"t":1407963842576,"m":"[etcd] Aug 13 21:04:02.575 INFO | Discovery via https://discovery.etcd.io using prefix /[cut].\n"} | |
| {"s":1,"t":1407963842975,"m":"[etcd] Aug 13 21:04:02.975 WARNING | Discovery encountered an error: Discovery found an initialized cluster but no reachable peers are registered.\n"} | |
| {"s":1,"t":1407963842975,"m":"[etcd] Aug 13 21:04:02.975 WARNING | \u003cno value\u003e failed to connect discovery service[https://discovery.etcd.io/[cut]] Discovery found an initialized cluster but no reachable peers are registered.\n[etcd] Aug 13 21:04:02.975 CRITICAL | \u003cno value\u003e, the new instance, must register itself to discovery service as required\n"} | |
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
| [ | |
| { | |
| id: "burger-grill-bbq", | |
| category: "Бургеры", | |
| title: "Бургер с грилловаными овощами с соусом BBQ", | |
| thumb: "http://placehold.it/350x260", | |
| price: 28, | |
| weight: 128, | |
| nutrition: ['бургер', 'гриллованые овощи', 'соус BBQ', 'дизайн', 'верстка'], | |
| addables: ['cheeses', 'cutlet'] |
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
| web: vendor/bin/heroku-php-nginx -C app_nginx.conf -F app_php-fpm.conf app | |
| verstat: cd verstat ; npm install ; verstat --exec-after-generate 'cd .. ; ./verstat2wp.sh' serve |
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
| <!-- http://htmlbook.ru --> | |
| <!-- Sublime Text 3 --> | |
| <html> | |
| <head> | |
| <meta charset="utf8"> | |
| <title>Moneycalc</title> | |
| <style> | |
| * { |