Мало кто знает, но что бы работал migration:diff вам не нужно ставить ORM.
Что бы это работало объявим простой сервис:
<?php| DOMAIN="www.mydomain.com" | |
| if [[ ! -f "${DOMAIN}.key" ]] | |
| then | |
| echo "x" | |
| openssl req -new -newkey rsa:4096 -nodes -keyout ${DOMAIN}.key -out ${DOMAIN}.csr | |
| fi | |
| echo Y | |
| cp ${DOMAIN}.crt ${DOMAIN}_combined.crt | |
| echo "" >> ${DOMAIN}_combined.crt |
| # get total requests by status code | |
| awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
| # get top requesters by IP | |
| awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
| # get top requesters by user agent | |
| awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
| # get top requests by URL |
Here is the list of talks that I found most useful to me.
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
Здесь я собираю годное чтиво, которое можно кинуть в случае чего в качестве ответа на какие-либо сложные вопросы
This is proof-of-concept implementation of laravel's like form requests.
Most of Symfony developers uses forms to map request data to some Data Transfer Object. This object then passes to validator and system start to work with validated data converted to be compatible with application model.
| <?php | |
| /** | |
| * UPDATE: This has been converted into a proper PHP library, | |
| * see https://github.com/kasparsd/mini-sheets-php | |
| */ | |
| // Note: there are some references to WordPress methods and functions | |
| class cf7_export_excel { |
| <?php | |
| var_dump(curlGetViaGoogleProxy('http://4ip.pw/')); | |
| function curlGetViaGoogleProxy($url, $post = '', $cookie = '') { | |
| $timestamp = time(); | |
| $authValue = 'ac4500dd3b7579186c1b0620614fdb1f7d61f944'; // via http://superuser.com/a/959419 | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); |
A great way to get Docker running smoothly on OS X is to use the awesome project Dinghy. It is basically:
Docker on OS X with batteries included, aimed at making a more pleasant local development experience. Runs on top of docker-machine.
Some of the benefits are: