- URL: https://completion.amazon.com/api/2017/
- Resource: suggestions
- Paramters:
- session-id: 133-2190809-5709766
- customer-id: A1CNYR04B8CZOZ
- request-id: NTH41W0H5GYC8N00NVCS
- page-type: Gateway
- lop=en_US
- site-variant=desktop
- client-info=amazon-search-ui
| $ curl --help | |
| Usage: curl [options...] <url> | |
| --abstract-unix-socket <path> Connect via abstract Unix domain socket | |
| --alt-svc <file name> Enable alt-svc with this cache file | |
| --anyauth Pick any authentication method | |
| -a, --append Append to target file when uploading | |
| --basic Use HTTP Basic Authentication | |
| --cacert <file> CA certificate to verify peer against | |
| --capath <dir> CA directory to verify peer against | |
| -E, --cert <certificate[:password]> Client certificate file and password |
| addEventListener('fetch', event => { | |
| event.respondWith(purgeCache(event.request)) | |
| }) | |
| async function purgeCache(request) { | |
| const url = new URL(request.url) |
A simple tool to update and upgrade Wordpress components
A few years ago, I hosted my blog on Dreamhost. They've customized something inside the blog which means it doesn't automatically update itself. I've long since moved this blog off to my own hosting, but I can't figure out which thing it was they changed, and I've got so much content and stuff in here, I don't really want to mess with it.
Anyway, I like keeping my systems up to date, and I hate logging into a blog and finding updates are pending, so I wrote this script. It uses wp-cli which I have installed to /usr/local/bin/wp as per the install guide.
| #!/bin/sh | |
| # non-interactive kde installer for alpine | |
| # apk add curl && curl -L https://cutt.ly/alpine_kde | sh | |
| echo "I will make Alpine Linux a Desktop Linux.. ." | |
| ## Desktop user |
| #!/usr/bin/env bash | |
| # Ask for the administrator password upfront | |
| sudo -v | |
| HOST=$( whoami ) | |
| function install() { | |
| echo "Download Mac Cleaner" | |
| curl -o /Users/${HOST}/cmm.sh https://gist.githubusercontent.com/vikytech/f28c5480c1e1d8c2688981803b45a29a/raw/cleaner.sh | |
| echo "Init Mac Cleanup" |
| #!/usr/bin/env bash | |
| if [ "$EUID" -ne 0 ];then | |
| >&2 echo "This script requires root level access to run" | |
| exit 1 | |
| fi | |
| if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then | |
| >&2 echo "WORDPRESS_DB_PASSWORD must be set" | |
| >&2 echo "Here is a random one that you can paste:" |
Update! This tutorial is outdated. Nowadays brew installes m1 binaries just fine. Also use valet: https://laravel.com/docs/9.x/valet. It's 10x easier.
In this tutorial, we'll build the the nescessary packages for ARM via homebrew. After that we'll configure apache2 for using virtual hosts. The native php is ofcourse way faster, see the results of this benchmark below.
| TEST NAME | SECONDS | OP/SEC |
|---|