A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer
- Composer Related
- Frameworks
- Micro Frameworks
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
# filter by request host header | |
varnishlog -q 'ReqHeader ~ "Host: example.com"' | |
# filter by request url | |
varnishlog -q 'ReqURL ~ "^/some/path/"' | |
# filter by client ip (behind reverse proxy) | |
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"' | |
# filter by request host header and show request url and referrer header |
defmodule Messaging.Repo.Migrations.CreateGroupChatVersions do | |
use Ecto.Migration | |
def change do | |
create table(:group_chat_versions, primary_key: false) do | |
add :group_chat_id, :uuid, primary_key: true | |
add :version, :integer, primary_key: true | |
timestamps | |
end |
[ | |
(...) | |
'queue' => [ | |
'amqp' => [ | |
'host' => '<rabbitmq_host>', | |
'port' => '<rabbitmq_port>', | |
'user' => '<rabbitmq_user>', | |
'password' => '<rabbitmq_pass>', | |
'virtualhost' => '/', | |
'ssl' => false |
defmodule MyApp.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
@migrator if Mix.env() in [:prod, :staging], do: [MyApp.Migrator], else: [] | |
def start(_type, _args) do | |
children = |
Because Varnish doesn't support SSL, most people choose a setup where Nginx SSL will forward all traffic to Varnish and Varnish will forward will forward the traffic it cannot handle back to nginx. Or worse, bind Varnish on port 80 and direct all traffic into Varnish. This will already degrade performance, because Varnish will purge more because static files are also taking up room in the cache.
Next up, the Nginx configuration of Magento will handle static files.
Generate PHP8.1 data model class with constructor promoted properties named ${DTO_NAME} with fields extracted from this array keys: | |
[ | |
"externalid" => $quoteItem->getItemId(), | |
"name" => $quoteItem->getName(), | |
"price" => $this->coreHelper->priceToCents($quoteItem->getPrice()), | |
"quantity" => $quoteItem->getQty(), | |
"sku" => $quoteItem->getSku(), | |
"description" => $quoteItem->getDescription(), | |
"imageUrl" => $imageUrl, | |
"productUrl" => $product->getProductUrl() |