WHO AM I? [IMDb 74 %]
Benjamin, a computer genius, is invited to join FRI3NDS, a fame-seeking hacker group.
PHP tip
array_map('unlink', glob(CACHE . DS . '*.tmp') ?: []);
This code snippet provides a robust and efficient way to delete temp files from a cache directory. It leverages the power of glob(), array_map(), and the null coalescing operator to ensure that the deletion process is reliable and handles various scenarios.
You know you can use your mouse and keyboard between different Macs using Universal Control and copy/paste between them (which makes it really easy when manually migrating settings, etc., between machines), but did you know you can also copy/paste whole files using Terminal:
On the first Mac:
cat my-file.txt | pbcopy
On the second Mac:
pbpaste > my-file.txt
Piping to pbcopy is something you’ll likely find useful in general.
(You can also drag/drop files to Finder.)
Feditrends shows trending topics from Mastodon / the Fediverse…
Ano, Mastodon sice neumí citace tůtů, ale fskutečnosti je umí, protože přece všichni rychle přijdou na to, že lze snadno nasdílet URL tůtu na jiné instanci (dokonce i na jiné platformě). Sice se tady neembedne do timeline, ale lze ho snadno prokliknout a ...
Snažně vás prosím, pokud pro to neexistuje fakt dobrý důvod - nedělejte ho. Na tom Twitteru šlo alespoň snadno favnout, retweetnout či komentovat ten citovaný twít, potože šlo o jednu a tu samou platformu. Tady to je zbytečně pracné a zdržuje to: musím nakopírovat URL toho rozkliknutého tůtu do search boxu své instance a pak teprve můžu favovat, boostovat, komentovat.
Ano, každý by radši, aby se následně šířil ve Fediverse JEHO vlastní tůt (status), s jeho komentářem a URL komentovaného. Ale takhle to není ve Fediverse zamýšleno. Je to v naprosté většině případů nefér pro autora původního tůtu a ochuzuje ho to o favy, boosty a komentáře pod jeho původním tůtem!
Pokud chcete komentovat tůt, tak PROSÍM, komentujte ho přímo pod tím tůtem a neochuzujte tak autora o zpětnou vazbu.
(jeden z důvodů, proč bych preferoval embedování "citovaných" tůtů je právě to, aby mi to ušetřilo ten copy+paste manévr nutný otevření citovaného tůtu a zapojení své odpovědi do správného vlákna.. chci interagovat s autorem, ne s tím, kdo autora cituje!)
Beyond aspect-ratio queries.
Since I came across this older tweet https://twitter.com/anatudor/status/1547144654017249280/photo/1 - we can do it! #tinyCSStip
Needs a fallback for Chrome without flag and doesn't yet work in Firefox stable, but it works in Nightly!
Live test https://codepen.io/thebabydino/pen/PogvwWo
Using this hack https://twitter.com/Jane0ri/status/1711258881521795295
This is a very neat trick to unset max-height when an HTML element with resize='vertical' set in CSS is resized. So you can have elements initially displayed with a max-height but then resized beyond it:
https://stackoverflow.com/a/60286469
(Should work as is for resize='block' and with the selector tweaked to use "width" for horizontal/inline.)
Little web dev tip: if you have just one address field in your HTML form (e.g., a textarea) but you still want the person filling it in to avail themselves of autocomplete, here’s a little reusable snippet you can use to achieve that:
(Ideally the web spec should be extended to include a full-address value for the autocomplete attribute.)
Hey everyone just FYI you can post to Kbin and Lemmy from Mastodon and other Fediverse Micro-blogging platforms by having one line of your post at the top be the title and putting a mention to the specific community's handle in your post, works best if the mention is below the title. Also you can even attach images and they will appear in the post as an image (multiple images don't work as well sadly).
You can find communities to post in on lemmyverse.net/communities
Here's an example of the format that works best, even for non-glitch instances:
[Post title text]
*(separate title and body with blank space)
[Post body text]
[Community's handle mention]
Tip, if you ever need it: take a lot of photos of your house for insurance/disaster reasons. More than you think you need. Of all the random details of stuff -- where shelves are, what your drawers look like, what pictures you have on the walls. Having just gone through a remodel due to a plumbing disaster, there are a lot of places I had wished I had photos of (ie the laundry room cabinets, the inside of the kitchen cabinets!) #disaster #tip #disasterpreparation #insurance #disasterprep
If you’re a web developer using Vivaldi, first thing you should do is go to Menu → Settings → Appearance and, under the Menu section, select Page from the Menu Customization dropdown then right-click on [Developer Tools] under Content and deselect Show as Subfolder.
You’re welcome
Update: You have to do this manually for *every item* in the Menu section. That’s Audio and Video, Image, Link, Selection, and Text Field in order to have the Inspect item top-level.
U oběda mi kamarád lícil velký čtenářský zážitek z četby Jiráskových pamětí. To mě dovedlo na skvělý web aloisjirasek.cz, kde je od něj vše. #tip
Did you know you can easily search through your own Mastodon posts?
Just include from:me in the search field.
Instead of this, you can include in:library to show posts you have interacted with or written yourself.
If you want to search through posts of a specific user, include from:username (the full username, including the instance)
If it doesn't work, have a look at this:
https://graphics.social/@metin/111821440228692015
Did you know there's a range of keyboard shortcuts in Mastodon's Web interface?
Just press the "?" key to view a list of hotkeys.