Skip to content

Instantly share code, notes, and snippets.

@tallesairan
tallesairan / README.md
Last active March 25, 2024 22:06
check if the post exists by slug and post type #wp

Tips

very useful when you can have an attachment with the same slug as a post record_exists_by_slug You can check the post if it exists as an attachment you can change, this way it is practically impossible to duplicate a post

@tinue
tinue / SMB-Pi.md
Last active July 25, 2024 08:04
Simple file server for old retro clients, based on Samba / Raspberry Pi

Retro File Server

A common challenge with retro machines is transferring data from and to it. If the retro machine has an Ethernet adapter that can be enabled, then sharing data via a file server is a good solution for this challenge.
Unfortunately, these old systems use protocols that are dangerous and thus disabled on any modern file server, such as a NAS. Usually, these protocols can be re-enabled on a NAS, but I would advise against doing this.

Instead, this Gist shows how a dedicated Raspberry Pi can be used to make a file server that supports all of these old protocols.

A word of caution: Because these protocols are dangerous, never expose the Raspberry Pi to the internet! You will most