service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval
(in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled
(true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags
(comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol
(http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled
(true|false)
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
# This can be added to your cron job to run right after Drupal's cron or combine them into a single command so | |
# that it automatically executes when the cron run completes. | |
wget -q http://www.example.com/sitemap.xml -O - | egrep -o "http://www\.example\.com[^<]+" | wget -q -i - -O /dev/null --wait 1 |
#!/bin/bash | |
# warmly.sh | |
# A wget based, easy, poor man`s cache warmer script | |
# https://gist.github.com/thomasfr/7926314 | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2013,2014 Thomas Fritz <fritztho@gmail.com> (http://fritzthomas.com) | |
# |
{ | |
"service_id":"%{req.service_id}V", | |
"service_version":"%{fastly_info.version}V", | |
"time_start":%{begin:msec}t, | |
"time_end":%{end:msec}t, | |
"time_elapsed":%{time.elapsed.usec}V, | |
"client_ip":"%{req.http.Fastly-Client-IP}V", | |
"request":"%{req.request}V", | |
"protocol":"%{req.proto}V", | |
"host":"%{req.http.Fastly-Orig-Host}V", |
# git clone from https://github.com/tkarras/progressive_growing_of_gans | |
# download the snapshot from their Google drive | |
# use the following code in the same directory to generate random faces | |
import os | |
import sys | |
import time | |
import glob | |
import shutil | |
import operator | |
import theano |
#!/bin/bash | |
# Inserts or removes iptables rules to prevent snat to the hosts local weave ip ranges | |
# This way the source ip will be retained for traffic not coming from weave | |
# Requires weave to be running, the script does wait for weave report to respond | |
echo running $0 $1 | |
action="${1:-start}" | |
echo action: ${action} | |
#functions taken from: https://stackoverflow.com/questions/10768160/ip-address-converter | |
dec2ip () { | |
local ip dec=$@ |
# file: aws_eks_config.yml | |
# AWS EKS ClusterConfig used to setup the BinderHub / JupyterNotebooks K8s cluster | |
# using a workaround from https://discourse.jupyter.org/t/binder-deployed-in-aws-eks-domain-name-resolution-errors/766/10 | |
# to fix broken DNS resolution | |
--- | |
apiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: eks-dns-production |
⚠️ Need a more specific guide? See https://medium.com/@murdercode/speed-up-your-laravel-application-up-to-1000x-with-fastcgi-cache-0135b11407e5
Using FastCGI cache allows you to speed up your website up to 1000x. In fact, the FastCGI cache (or Varnish) mechanism consists of putting a server-caching mechanism between a client and your web server. The whole page will be cached as an HTML output, and it will be delivered instead of using the PHP/MySQL/Redis stack, etc. for all users, but only for the first visit (and others after some specified time).
WARNING: This is not a take-away how-to. Please read it carefully and use it at your own risk.
This config is based on the ploi.io stack. We will not cover the FastCGI installation process, so please prepare FastCGI and adapt the next config if you need it.
2019-03-26 by Matt Allan
Original URL: https://mattallan.me/posts/how-php-environment-variables-actually-work/
Laravel, Symfony, and other modern PHP frameworks use environment variables to store security credentials and configuration that changes from one machine to the next.
The latest Laravel release made a small change to the way environment variables are loaded. This change ended up breaking third-party libraries and Laravel itself.