This tutorial will guide you on how to install OCI8 for PHP8.3 using Oracle Instant Client arm64.
Run the command below if you haven't installed it on your machine.
xcode-select --install| function search_and_remove() { | |
| // Search for crashed windows and tabs. Reverse the list so that we delete | |
| // from the bottom, which is MUCH faster. | |
| elements = Array.from(document.querySelectorAll('li.savedwinNTASC,li.savedtabNTASC')).reverse(); | |
| if (elements.length == 0) { | |
| console.log("Finished removing stale windows and tabs."); | |
| return; | |
| } |
This tutorial will guide you on how to install OCI8 for PHP8.3 using Oracle Instant Client arm64.
Run the command below if you haven't installed it on your machine.
xcode-select --installI had an interesting use-case with a customer for which I provide consulting services: they needed multiple fields to be marked as "optional".
We will take a CRUD-ish example, for the sake of simplicity.
For example, in the following scenario, does a null $description mean "remove the description",
On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker) might require Rosetta.
Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)
Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli image has the following digests:
| <?php | |
| // -- types are a compile-time propagated concept | |
| // https://psalm.dev/r/338f74a96c | |
| class TheType | |
| { | |
| /** @var string */ | |
| public $foo = 'bar'; | |
| } |
| #!/usr/bin/env php | |
| <?php | |
| declare(strict_types=1); | |
| namespace WaitForElasticsearch; | |
| use InvalidArgumentException; | |
| use UnexpectedValueException; | |
| use function curl_close; |
| <?php | |
| declare(strict_types=1); | |
| final class AnonymizeData | |
| { | |
| private $payload; | |
| public function __construct(array $payload) | |
| { |
TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.
If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)
A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/
The reason to avoid JWTs comes down to a couple different points:
plugins/php/lib/php.jar and plugins/php/lib/php-openapi.jar.Provided and make sure the Export checkbox is unchecked.Now you should be able to create a Plugin-type run configuration and run the plugin. To build a final jar file, use Build | Prepare Plugin Module For Deployment.
| create table test (p Int64, t Int64, x String, y Int64) engine=MergeTree order by (p,t) | |
| insert into test select intDiv(number,10000), rand() r, toString(r), number from numbers(10000000); | |
| select count(), min(x) from ( | |
| select * from test order by p, t limit 1 by p | |
| ) | |
| ┌─count()─┬─min(x)─┐ | |
| │ 1000 │ 100420 │ | |
| └─────────┴────────┘ |