Masthash

#howto

Nyangire
5 hours ago

I'm not the best at hands but I have started to enjoy drawing them after learning some things and I'm thinking about making a tutorial.

#howtodraw #howTo #drawingTutorial #mastoArt #fediArt #tutorial #stepByStep #hands #art #lineart

Step by step hand pose

Any Mastodon/Mailchimp aficionado’s on here? Wanting to add a Mastodon icon to the footer of our Mailchimp newletters. Currently only seeing Twitter but no Mastodon. Perhaps not possibleyet?

#Mastodon #Mailchimp #howto

Learn how to decorate #winter-themed #cookies using royal icing with The Graceful Baker. In the #video you'll see different icing consistencies and techniques like creating cracked textures and pulling patterns through wet icing. 🍪⛄️🐻‍❄️❄️

👉 Watch it: https://thekidshouldseethis.com/post/decorating-9-winter-themed-cookies-with-royal-icing

#animals #cute #diy #food #howto #snow #baking

Winter-themed cookies
Rotfarm
17 hours ago

Been thinking of names for this zine that may be better than "DIY computer care"

How about
"Tech Medic : DIY computer Care Zine"
(works with the cross motif I'm using)

#zines #HowTo #IT #DIY

LBHuston
2 days ago

A crucial part of a vCISO's role is presenting the organization's security posture to stakeholders, such as the executive team and board members.

Read more 👉 https://lttr.ai/ALBAS

#Security #Infosec #Compliance #Howto #Strategy

How-To Geek
3 days ago
3 days ago

How to install Redis on Debian or Ubuntu

In this quick guide, you will install a free Redis server in what takes just about a minute.

https://www.itthinx.com/2023/11/14/how-to-install-redis-on-debian-or-ubuntu/

#Redis #Debian #Ubuntu #Howto #Tutorial

Glenn Gabe
3 days ago

OK, we know Google is testing bringing back FAQ snippets, but they are also testing that for HowTo snippets! I'm seeing them return for a number of sites across both mobile and desktop (although I can reproduce on dtop much easier than mobile). Just a heads-up if you have HowTo markup implemented.

#google #seo #howto

Lowyat.NET
3 days ago

A Hands On With Malaysia Airlines’ In-Flight Complimentary WiFi #editorial #handson #how-to's #howto #in-flightwifi #malaysiaairlines #mas #travel

https://www.lowyat.net/2023/312215/malaysia-airlines-wifi-hands-on/

Terence Eden
3 days ago

🆕 blog! “eInk Display for Octopus's Agile Energy Tariff”

I'm a little bit obsessed with building eInk displays. They're pretty cheap second hand. They're low energy, passive displays, with good-enough performance for occasional updates. Here's a new one which shows me what the current cost of my electricity is: Background After installing solar panels, a …

👀 Read more: https://shkspr.mobi/blog/2023/12/eink-display-for-octopuss-agile-energy-tariff/

#battery #eink #HowTo #php #solar

eInk Display for Octopus's Agile Energy Tariff
https://shkspr.mobi/blog/2023/12/eink-display-for-octopuss-agile-energy-tariff/

I'm a little bit obsessed with building eInk displays. They're pretty cheap second hand. They're low energy, passive displays, with good-enough performance for occasional updates. Here's a new one which shows me what the current cost of my electricity is:

Background

After installing solar panels, a smart electricity meter, and a solar battery - the next obvious step was a smart energy tariff.

Octopus (join and we both get £50) have an "Agile" tariff. Unlike a normal tariff - with a set price for electricity - this tariff fluctuates every 30 minutes. Prices depend on wholesale costs which means they can go negative. That's right, you can get paid to soak up excess power.

Of course, they can also spike considerably. Unlike the failed Texas experiment, here the maximum price is capped at £1/kWh.

Every day at about 1600, the next day's prices are published on Octopus's website. And they're also made available via a simple REST API.

So, it's relatively simple to generate a line graph and display it on the eInk screen.

Code

(You can treat this code as MIT Licenced if that makes you happy.)

Calling the API for the half-houly prices is:

$url = "https://{$API_KEY}:@api.octopus.energy/v1/products/" .       "AGILE-FLEX-22-11-25/electricity-tariffs/E-1R-AGILE-FLEX-22-11-25-C/standard-unit-rates/";

Your API_KEY is unique - and you'll need to check which tariff you're on.

The data is retrieved as JSON and converted:

$content = file_get_contents($url);$data = json_decode($content);

The JSON is full of entries like this:

"results": [{  "value_exc_vat": 13.6,  "value_inc_vat": 14.28,  "valid_from": "2023-11-01T22:30:00Z",  "valid_to": "2023-11-01T23:00:00Z",  "payment_method": null},{  "value_exc_vat": 18.4,  "value_inc_vat": 19.32,  "valid_from": "2023-11-01T22:00:00Z",  "valid_to": "2023-11-01T22:30:00Z",  "payment_method": null},

They're newest first, so need to be reversed:

$tariffs = array_reverse( $data->results );

Then it's a case of looping through them and grabbing today's data:

$userTimeZone = new DateTimeZone('Europe/London');$now = new DateTime('now', $userTimeZone);$nowPosition = 0;$datay = array();$datax = array();foreach ( $tariffs as $tariff ) {    $dateStringFrom = $tariff->valid_from;    $dateStringTo   = $tariff->valid_to;    $dateTimeFrom = new DateTime($dateStringFrom, new DateTimeZone('UTC'));    $dateTimeTo   = new DateTime($dateStringTo,   new DateTimeZone('UTC'));    if ($now >= $dateTimeFrom && $now <= $dateTimeTo) {        $costNow = $roundedInteger = (int)round( $tariff->value_inc_vat );        $hour   = intval( $dateTimeFrom->format('G') ); //  No leading 0        $minute = intval( $dateTimeFrom->format('i') );        $offset = ($minute == 0) ? 0 : (($minute == 30) ? 1 : null);        $nowPosition = (2 * $hour) + $offset + 0.5;        $until = $dateTimeTo->format('H:i');    }    if ($dateTimeFrom->format('Y-m-d') == $now->format('Y-m-d')) {        $datax[] = $dateTimeFrom->format("H:i");        $cost = $roundedInteger = (int)round( $tariff->value_inc_vat );        $datay[] = $cost;    }   }

Drawing the graph uses the venerable JPGraph:

$path = 'jpgraph/';set_include_path(get_include_path() . PATH_SEPARATOR . $path);require_once ('jpgraph/jpgraph.php');require_once ('jpgraph/jpgraph_line.php');require_once ('jpgraph/jpgraph_plotline.php');// Size of graph$width  = 600;$height = 600;// Setup the graph$graph = new Graph($width,$height);$graph->SetScale("intlin");$graph->SetMargin(35,0,45,20); // L R T B$graph->SetUserFont('dejavu/DejaVuSansMono.ttf');$graph->title->SetFont(FF_USERFONT,FS_NORMAL,25);$graph->SetBox(false);$graph->title->Set( $now->format('l') . "'s Electricity Prices\n" . $costNow . "p / kWh until {$until}" );$graph->title->SetColor('#000');$graph->ygrid->Show(true);$graph->xgrid->Show(true);$graph->xaxis->SetTickLabels( $datax );$graph->xaxis->SetColor('#000');$graph->yaxis->SetColor('#000');$graph->xaxis->SetFont(FF_USERFONT, FS_NORMAL, 10);$graph->yaxis->SetFont(FF_USERFONT, FS_NORMAL, 14); // Just let the maximum be autoscaled$graph->yaxis->scale->SetAutoMin(0); // Only show up until 23:00$graph->xaxis->scale->SetAutoMax(46);$graph->xaxis->SetTextLabelInterval(2); $graph->SetTickDensity(TICKD_DENSE, TICKD_DENSE);  // Create the line plot$p1 = new LinePlot($datay);$graph->Add($p1);$p1->SetStepStyle();$p1->SetColor('#000');//                 Direction, position,     colour@alpha, width$l1 = new PlotLine(VERTICAL,  $nowPosition, 'black@.8',   13);// Add vertical highlight line to the plot$graph->AddLine($l1);// Output line$graph->Stroke();

Next steps

I dunno? Add some details about carbon emissions? Battery stats? Let me know what you think in the comments.

https://shkspr.mobi/blog/2023/12/eink-display-for-octopuss-agile-energy-tariff/

#battery #eink #HowTo #php #solar

Rotfarm
4 days ago

More art from the DIY PC care Zine. These will be available for prints on the release of the zine at my ko-fi shop
https://ko-fi.com/bit_form

#GlitchArt #zine #MastoArt #HowTo #computers #abstractart #DIY

a letter sized page split on it's side split vertically between two pieces of art for a zine. 

On the left an abstract glitched photo with a face near a computer. repetitions of shapes create blocks colored in fractals of green,[pink, purple,black green litter the image and distort it heavily. The retitions create trails that lead the eye across, and down the art like a snake into darker, and more saturated tomes of color. It feels sort of cubist in it's use of geometrical, angular shapes like rectangles and triangles. 

On the Right.a more stylistic cuberpunk colored image with offsett pinks and blies are the focal point with repetitions and mirror images set in other colored blocks in other locations above the most obvious image of a man in a button down shirt at a computer
Rotfarm
4 days ago

Back at it!

Cover of DIY computer care zine.
#DIY #zines #IT #sustainability #HowTo #MastoArt #GlitchArt

A cover of a zine. The background is an image of a black crumpled paper printed onto a black white paper with "DIY COMPUTER CARE" cut out of printed type and glued in disjointed parts in vertical order. 

The words "computer" and "care" are separated by a black and white image of a ambulance cross in a grey square.

Welcome to our 💫fabulous💫 new blog tour for

༻*·.How to Dress like a Tudor.·*༺
by Judith Arnopp!

Check out today's stops, showcasing this fascinating ’how to’ guide to Tudor fashion!

https://thecoffeepotbookclub.blogspot.com/2023/11/blog-tour-how-to-dress-like-a-tudor-by-judith-arnopp.html

#HistoricalNonFiction #TudorFashion #BlogTour #TheCoffeePotBookClub #bookstodon #howto

Rotfarm
5 days ago

Still slowly working at it!

#Zines #Glitchart #HowTo #MastoArt

Some text cut out and pasted to a black and white glitchy image of a tombstone with a skull on it. 

It reads  "The purpose of this zine is to help things BEFORE they break. This is not a necromancy guide. It's a maintenance guide ;) "
LegalQuilts
6 days ago

New video up continuing the How to Make A Bargello Quilt Series: https://youtu.be/Uz4ylZ960t0

Like, comment, boost. Every little bit helps.

#quilting #HowTo #SideHustle

TDonoval
6 days ago

4/
I can’t think of anything else that upsets me about #Mastodon so I might just as well get back to the boosting issue.

I have a suggestion of the “what if” sort this time. What if your #home #timeline also showed #toots #favorited by the people you #follow. Wouldn’t it be nice to boost the boosting function this way and give an extra power-up to the content #distribution?

Ok, I may not be the first to come up with this idea. Maybe it has already been tested and proved technically unfeasible. But still, what if....

#boost #share #boosting #reblogging #sharing #ForYou #HowTo #FediTips #Gargron #MastoTips #JohnMastodon
#xl8freelancer

TDonoval
6 days ago

3/

Then there is the ‘For you’ tab in Search that shows #suggested profiles to #follow.

This would be a very useful tool if it worked. However, unless you follow them all, it keeps showing the same profiles, presumably forever. At least that’s my experience. I did it once shortly after I had joined Mastodon, the suggested profiles refreshed .... and have since remain unchanged.

Maybe some more seasoned #Mastodonians know if this is a #bug or a #feature.

#boost #share #boosting #reblogging #sharing #ForYou #HowTo #FediTips #Gargron #MastoTips #JohnMastodon
#xl8freelancer

TDonoval
6 days ago

2/
The thing that buggers me the most is boosting.

I know boosting is important because it’s the only way to spread the news around as there are no #algorithms here to force-feed us what they “think” is good for us, and I’m quite a #booster myself, too. But I’ve cut back a bit recently for a simple reason: I can’t hide boosted posts from my #profile.

I mean, when someone views my profile I want them to see my toots first so they can get an idea of who I am and, conversely, when I visit someone else’s profile I prefer to see what they have to say.

If you’re a generous booster but not so creative in the “#ContentCreation” department, just like me, you get a profile full of re-blogged posts where your original #toots are hard to find. And no, #Pinned toots don’t do the trick.

If there’s a #hack to work around this, I would much appreciate if you share it here.

#boost #share #boosting #reblogging #sharing #ForYou #HowTo #FediTips #Gargron #MastoTips #JohnMastodon
#xl8freelancer

TDonoval
6 days ago

Long thread
1/

My year with Mastodon (#MastodonWrapped)
I celebrated my first #Mastoversary a few days ago. It’s been a good first year on Mastodon for me; I like the #Fediverse idea, I like people here, and I like the calm vibe this place offers.

Also, I ditched all of my other #SocialMedia accounts. All but one.¹

As I say, Mastodon is a good #platform to be, however there are a couple of things I’ve been struggling with the whole time. I’m going to put together a brief summary below in hope that someone can help me with them.
-----------------------
¹ I still keep Instagram to exchange cute pics of sloths and pandas, and ice-hockey reels with my sons. 😁

#boost #share #boosting #reblogging #sharing #ForYou #HowTo #FediTips #Gargron #MastoTips #JohnMastodon
#xl8freelancer

A happy Mastodonversary picture with a black and white cartoon panda and a pink birthday cake.

How do you sign ‘one way’ or ‘don’t walk’ in American Sign Language? ✋

In this classic 1980 Sesame Street clip, Linda, the local librarian, demonstrates how to sign signs—specifically a series of pedestrian directions commonly found in a city. ⛔️⚠️🛑

👉 Learn more: https://thekidshouldseethis.com/post/linda-signs-signs-a-classic-from-sesame-street

#1980s #howto #kids #tv #PBS #asl

A child learning sign language on Sesame Street
Christian Pietsch 🍑
1 week ago

@langscipress @felwert @tschfflr @OliverCzulo

#HowTo #Markdown in #LaTeX: https://www.overleaf.com/learn/how-to/Writing_Markdown_in_LaTeX_Documents

You don't need an account on overleaf.com to do this. I tried it with a self-hosted #Overleaf Community Edition aka #ShareLaTeX instance, and it worked. It should work in any recent LaTeX environment.

#TexLaTeX

LBHuston
1 week ago

Maximize Your Cybersecurity: Discover How a Virtual CISO Can Transform Your Business Security Strategy: https://lttr.ai/AKvd7

#Security #Infosec #Compliance #Howto #Strategy

Learn how to create sturdy and crack-free DIY air dry clay with Clay It Now's 'cold porcelain' baking soda clay #recipe. Popular in #SouthAmerica, this eco-friendly and easy-to-make clay requires no #baking and uses natural ingredients like flour, corn starch, #water, and even toilet paper. Perfect for both professional artists and crafty #kids, it reflects a shift away from using PVA glues/polymers in air dry clay recipes. 🌽💦🧻

👉 Watch it: https://thekidshouldseethis.com/post/how-to-make-homemade-cold-porcelain-air-dry-clay

#art #diy #howto #tksst

A ball of air dry clay
SAPIENTech
1 week ago

Level up your script design! Check out this demonstration of a building block approach to #PowerShell #script design with a real-life case study and example #code.

#SAPIENTech #PowerShellStudio #PrimalScript #pwsh #scripting #module #modules #HowTo

https://www.sapien.com/blog/2023/11/29/powershell-tools-and-controllers-an-approach-to-script-design/

bgrier 🇨🇦 ⌨️
1 week ago

Blog Post: PLEX Privacy Problem.

At the beginning of November 2023, PLEX enabled some new features that have turned out to be a bit of a PR and Privacy nightmare.

Basically, they've started emailing all members of a PLEX server with the recent viewing habits of other members of that server. Even if the members don't know each other, PLEX apparent

https://bradgrier.com/2023/11/28/plex-privacy-problem/

#EmergingTechnology #HowTo #InTheLife #LifestyleTechnology #News #PLEX #privacy #SelfHosting #GDPR

Did you know that every object you touch remembers your fingerprints? They're like little #ghosts that you leave behind everywhere you go. The oil and sweat on your fingers create unique patterns of ridges called dermatoglyphs. Plus, learn how to dust for fingerprints in this two-minute MetKids #video. ☝️🪞👻

👉 Learn more: https://thekidshouldseethis.com/post/how-to-dust-for-fingerprints

#art #biology #diy #howto #science

An illustration comparing fingerprints to ghosts
Adrian Segar
1 week ago

Here's how to trust your gut, how trusting your gut can change your life, how to get better at doing it…and when you shouldn’t.

https://www.conferencesthatwork.com/index.php/life-lessons/2021/05/how-to-trust-your-gut

#intuition #HowTo #TrustYourGut #trust #assnchat

Screenshot of my 21-minute presentation "How to trust your gut" recorded on Kiki L'Italien's Association Chat show
taxicomics
2 weeks ago

Working on a little Jam game and utilized a gameboy style for that. I also made a video about how to achieve that style in #pico8 ,if you want to try for yourself :)
https://www.youtube.com/shorts/ky-6SePDec0
#gamedev #youtube #howto #gameboy #ScreenshotSaturday

Karen E. Lund 💙💛
2 weeks ago

A day late (apologies, I spend Friday on a four-park hike) but...

How to Contact Amazon Customer Service on Black Friday
By Lindsey Ellefson ,Lifehacker

"Black Friday has always been chaotic and its migration from an in-store stampede to online event hasn’t done much to change that.

"The first thing you should do when trying to get Amazon assistance on Black Friday is check the Customer Service Help Page..."

#LifeHacker #HowTo #CustomerService

https://lifehacker.com/money/contact-amazon-customer-service-on-black-friday?utm_source=pocket_saves

Linus Tech Tips
2 weeks ago
Miguel Friginal
2 weeks ago

I started playing (and GMing) tabletop role-playing games in the 80s, and this is the best book I have ever read on how to do it. Don't be fooled by the title, @hexcrawl 's “SO YOU WANT TO BE A GAME MASTER” is for newbies and old grognards alike, full of practical advice and hands-on, inspired discussion on many, many topics, that you can put to use right away. Do yourself a favor, and run to your bookstore!

#TTRPG #RPG #DnD #book #howto

The book “So You Want to Be a Game Master” by Justin Alexander, in both its paper and Kindle editions, sitting on a table.
Habr
2 weeks ago

Неочевидные моменты TypeScript и способы их решения

Разрабатывая на TypeScript, можно столкнуться с ситуациями, в которых код будет работать не так, как ожидается. В статье разберем несколько таких моментов. Часть просто придется иметь ввиду, часть решается обновлением, а часть исправляется – обо всем по порядку. Если вам будет удобно сразу же проверять каждый пример, читая статью, можно это делать в редакторе . Он удобен тем, что версию TypeScript в нем можно переключать.

https://habr.com/ru/articles/775330/

#typescript #разработка #вебразработка #неочевидно #howto #полезные_приёмы

What does it take to sink a LEGO boat? This Brick Technology #video puts seven LEGO boats to the test against six boat-sinking #LEGO machines. Find out which machine brings down the most boats and which method brings down the biggest boat in the group. 🚢🌊🪦

👉 Watch it: https://thekidshouldseethis.com/post/sinking-lego-boats-with-six-lego-machines

#tksst #diy #howto #engineering #stem #physics #science #technology

A boat made of LEGOs

He encontrado las librerías de Python que permiten convertir textos HTML en Markdown. Pero hay muy poca cosa para convertir Markdown en HTML.
Un complemento de Obsidian lo hace para exportar las notas de esta aplicación, pero produce un HTML farragoso y muy extenso, además de añadir archivos de estilo, clases y etiquetas "span" para que el texto se muestre como en Obsidian.
Alguien sabe de librerías o tutoriales para:
A) convertir HTML a Markdown
B) limpiar HTML y reducirlo a las etiquetas básicas: p,h,strong,em,a,ul,ol,li,table,tr,td,img,html,body,...

#markdown #html #python #programacion #howto

steve cooley
2 weeks ago

I illustrated my blog post about how I modded my desktop scanner to get high res images of 16x20" artwork on a 9"x12" scanner, using a panoramic photo stitching feature in #affinity photo 2.
https://sc-fa.com/blog/desktop-scanner-modding/
#scanner #mod #resolution #oversized #panorama #art #mastoart #fediart #howto #diy

a diagram showing four parts of a large painting, scanned from the source artwork, into four files. The photos get dropped into Affinity Photo 2, and then are assembled into one very large image, using their Panoramic Image assembler thing.
Dru Stevenson
3 weeks ago

#video #videoediting #youtube #howto I'm a law prof novice at video editing. I want to incorporate into a video lecture a rapid montage of short clips (a few sec each) from local evening news videos on YouTube. How can I easily pull video clips for this? Noncomercial higher ed use.

LegalQuilts
3 weeks ago

New video up. Continuing the Sea Surface Tempestry Quilt. Like the video, subscribe to my channel, commet, boost. Thank you. https://youtu.be/xM9YETjlj0g
#TempestryProject
#ClimateChange
#OceanWarming
#quilting
#QuiltingFun
#HowTo

The contents of this post are literally smack dab in the middle of a Venn diagram between “productivity” and “Asperger’s syndrome” AFAIC. #obsidian #howto #justuseaspreadsheetdude

https://reddit.com/r/ObsidianMD/comments/17y5n71/job_hunting_with_obsidian/

Pouring with rain?

Grab a cuppa and watch our latest video!

https://youtu.be/oNeF2zlGkhA

(Then pop your headphones on and relax with our podcast 🌱 )

https://www.buzzsprout.com/2265919/share

#gardening #gardens #podcast #planting #landscaping #tips #HowTo

Adrian Segar
3 weeks ago

The most popular of the in-person sessions I design and facilitate is The Solution Room. Here's how to run The Solution Room online.

https://www.conferencesthatwork.com/index.php/event-design/2020/11/run-solution-room-online

#meetings #EventDesign #TheSolutionRoom #HowTo #online #plenary #eventprofs

run The Solution Room online: photograph of an in-person Solution Room session. Many round tables of eight people fill a large room.
gregorni
4 weeks ago

Oh my god, @GeopJr made a website that explains how to make a GTK4 (+ optionally libadwaita) app in Crystal!

https://ultimate-gtk4-crystal-guide.geopjr.dev/ – Ultimate GTK4 Crystal Guide

#Crystal #CrystalLang #GNOME #App #GTK4 #GTK #Libadwaita #Guide #HowTo #Programming #website

Ryan Smith
1 month ago

I've got a new blog post up, this one gets into how to make a simple, cheap, and clean-burning ritual fire.

WARNING: Please exercise all appropriate precautions that you would use when doing anything involving fire.

#Pagan
#Heathen
#Blog
#HowTo
#Witch
#Ritual

https://www.onblackwings.com/post/making-a-portable-ritual-fire

Kévin Dunglas
1 month ago

Use FrankenPHP with custom Caddy modules. #HowTo #PHP #golang https://github.com/dunglas/frankenphp/pull/287

Rocky Linux :rockylinux:
1 month ago

Do you know how to set up a secure firewall for your network? Our 'firewalld' tutorial has had good reviews from users. It can walk a beginner through the process of setting up the default Rocky Linux firewall daemon. For users with some previous knowledge of older firewall technologies, the IpTables Guide helps translate that knowledge into the 'firewalld' setup. https://docs.rockylinux.org/guides/security/firewalld-beginners/ #tutorialtuesday #firewalld #howto #linuxtips #documentation

background is a series of lines of commands from a command line. Text reads, "how to run firewalld with rocky linux."
Terence Eden
2 months ago

🆕 blog! “Publish Confirmation For WordPress Classic (2023)”

Here's a quick scrap of code that works. There are lots of outdated tutorials out there for old versions of WordPress. This one is tested to be working in WordPress 6.3.2. This will pop up a confirmation dialogue when you try to publish, update, or schedule a post or page. The Code Add this to […]

👀 Read more: https://shkspr.mobi/blog/2023/10/publish-confirmation-for-wordpress-classic-2023/

#HowTo #php #WordPress

Terence Eden
2 months ago

🆕 blog! “Find WordPress featured images with no alt text”

WordPress allows you to set a featured image - called a "thumbnail" in the API. This gives a single image which can be used on a listing page, or shown when a post is shared on social media. The WordPress Media Library lets you set the alt text of an image. But, crucially, this alt […

👀 Read more: https://shkspr.mobi/blog/2023/10/find-wordpress-featured-images-with-no-alt-text/

#accessibility #AltText #HowTo #php #WordPress

Find WordPress featured images with no alt text
https://shkspr.mobi/blog/2023/10/find-wordpress-featured-images-with-no-alt-text/

WordPress allows you to set a featured image - called a "thumbnail" in the API. This gives a single image which can be used on a listing page, or shown when a post is shared on social media.

The WordPress Media Library lets you set the alt text of an image. But, crucially, this alt text can be different when the image is used as a featured image.

Here's how to find all your featured images which don't have alt text.

One Liner

Paste this into wp shell to get a list.

foreach (get_posts( array( 'post_type' => 'post', 'post_status' => array('publish'), 'posts_per_page' => -1,) ) as $post) { if( simplexml_load_string( get_the_post_thumbnail($post) )["alt"] == "") { echo $post->post_date . " " . get_site_url(). "/wp-admin/post.php?post=" . $post->ID . "&action=edit " . $post->post_title . "\n"; } }

An explanation

To get the image element of the featured image, use get_the_post_thumbnail(1234); That will spit back:

<img width="800" height="400"      src="https://example.com/test.png"     class="attachment-post-thumbnail size-post-thumbnail wp-post-image"     alt="This is some alt text."     decoding="async" loading="lazy" />"

If there's no alt, you'll see alt="".

Getting an attribute out of a scrap of HTML is simple. We're going to be naughty and pretend this is XML. Shhh! Don't tell the W3C!

$xml = simplexml_load_string( get_the_post_thumbnail(1234) );

The alt text can be retrieved with:

$alt = $xmlEl["alt"];

So anything where $xmlEl["alt"] == "" is an image without alt text.

Finally, the code generates a link to the edit page of the post.

https://shkspr.mobi/blog/2023/10/find-wordpress-featured-images-with-no-alt-text/

#accessibility #AltText #HowTo #php #WordPress

Chris Lamothe
2 months ago

#lifehack: toggle Reader Mode on your iPhone with a double tap to the back of the screen.

#HowTo
1. Shortcuts > Add Action > Show Hide Safari Reader

2. Settings > Accessibility > Touch > Back Tap > Double Tap > scroll down and find your reader shortcut

Terence Eden
2 months ago

🆕 blog! “Find the URl causing your WordPress Error”

PHP has some pretty good error handling and logging, but I do sometimes find it confusing. For example, look at this warning message: [18-Oct-2023 12:34:56 UTC] PHP Warning: Something bad happened in /wp-content/something.php on line 123 OK, so we can go to something.php and scroll to line 123 and try to figure out wha…

👀 Read more: https://shkspr.mobi/blog/2023/10/find-the-url-causing-your-wordpress-error/

#HowTo #php #WordPress

Find the URl causing your WordPress Error
https://shkspr.mobi/blog/2023/10/find-the-url-causing-your-wordpress-error/

PHP has some pretty good error handling and logging, but I do sometimes find it confusing. For example, look at this warning message:

[18-Oct-2023 12:34:56 UTC] PHP Warning: Something bad happened in /wp-content/something.php on line 123

OK, so we can go to something.php and scroll to line 123 and try to figure out what's gone wrong. But we don't know which page, post, or URl caused the error. If the error only occurs on /page/test?input=6 and not /page/test?output=7 that would be handy to know, right?

So here's some PHP you can stick in your theme's functions.php file:

function custom_warning_handler($errno, $errstr, $errfile, $errline) {    $url = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] : 'Unknown URL';    error_log("Warning at $url: [$errno] $errstr in $errfile on line $errline");}set_error_handler('custom_warning_handler', E_WARNING);

Now your error_log file will contain:

[18-Oct-2023 12:34:56 UTC] Warning at example.com/blog/page.php?foo=bar: [2] Cannot apply fuzz to kittens in /wp-content/something.php on line 123

You can find out more about set_error_handler() and how to configure it.

https://shkspr.mobi/blog/2023/10/find-the-url-causing-your-wordpress-error/

#HowTo #php #WordPress

Chris Pirillo
2 months ago

I feel the thing that made “TechTV” work was the camaraderie and casual conversations that played out on camera. I’m looking to optimize new videos in line with that approach - inviting others to join, packing the programming with help and how-to (beginning to end): https://youtu.be/_mo25gI2wwE

#tech #news #technology #software #hardware #gadgets #help #howto

Terence Eden
2 months ago

🆕 blog! “Displaying internal linkbacks on WordPress”

I have written a lot of blog posts. In some of those posts I link to other posts on my site. What's the easiest way of displaying those internal incoming links? Here's what it looks like: Code All we need to do is search WordPress for the URl of the current page. Loop through the […]

👀 Read more: https://shkspr.mobi/blog/2023/10/displaying-internal-linkbacks-on-wordpress/

#blogging #HowTo #php #WordPress

Terence Eden
2 months ago

🆕 blog! “Making a better audio shortcode for WordPress”

If you use WordPress, you can get a fairly basic embedded audio player by using the audio shortcode: [audio mp3="/path/to/sound.mp3"] I didn't particularly like how it was styled so - because WordPress is so hackable - I changed it! Now my embedded audio looks like this: It gets a nice border, a title, displa…

👀 Read more: https://shkspr.mobi/blog/2023/10/making-a-better-audio-shortcode-for-wordpress/

#audio #HowTo #WordPress

noisio
2 months ago

Build yourself a #synth. For example this 10 voices Levitation OSC drone synthesizer spaceship:
https://www.youtube.com/watch?v=nW8YwfdEO0c

Learn #howto solder. Ask me any questions about #sound synthesis, #microcontroller programming or #audio #electronics.

14.10. | 15:00 | Zentralwerk Dresden

#dave #festival #dresden

https://www.dave-festival.de/veranstaltung/dave_con_diy_loeten/

Videostill of Levitation OSC diy synth with many visible parts and potentiometers in front of high saturated background color glitches.
CoffeeGeek
2 months ago

Of COURSE we have opinions on the #latte, the drink that built Starbucks (it wasn't espresso; it was the latte! In fact, Starbucks choice of machines during their massive expansion in the 1990s, the La Marzocco Linea 4 group, was based on its massively humongous 15l steaming boiler... for milk production).

We also have a detailed #howto on making a proper latte. Not much #latteart focus. We focus on the Latte itself and a delightful ratio. I hope you enjoy!

https://www.coffeegeek.com/guides/latte/

CoffeeGeek
2 months ago

We don't just have #reviews and #howto articles on CoffeeGeek. We do occasional news, opinion articles, and we also feature creative writing about coffee culture. And we're always looking for guest writers who can contribute this kind of content.

One thing I want to try and publish more are travelogue type articles and casual historical looks at #coffee.

A recent article that fits this bill is Ethan McGonigal's look at #siphoncoffee and its history in #Japan.

https://www.coffeegeek.com/culture/siphon-coffee-in-japan/

DansLeRuSH ᴱᶰ
2 months ago

On this day of #Ubuntu release, it's time to have another look at this @omgubuntu tutorial on « #HowTo install #Flatpak » on it :troll: https://www.omgubuntu.co.uk/how-to-install-flatpak-on-ubuntu

Terence Eden
2 months ago

🆕 blog! “Use WP CLI to find all blog posts without a featured image - two methods”

This uses the wp shell command. It gives you an interactive prompt into which you can do various WordPress "things". One small annoyance is that it doesn't like multi-line entry. It treats every hit of the enter key as "plz run the codez" - s…

👀 Read more: https://shkspr.mobi/blog/2023/10/use-wp-cli-to-find-all-blog-posts-without-a-featured-image-two-methods/

#blogging #commandline #HowTo #WordPress

Codrops
2 months ago

Want to learn how to create a responsive #WebGL layout powered by CSS and React Three Fiber? Then follow David Lindkvist from @14islands in this #tutorial on progressively enhanced WebGL lens refraction 🔮

👉 https://tympanus.net/codrops/?p=73607

#frontend #react #css #javascript #webdesign #ui #webdevelopment #masterclass #howto

Terence Eden
2 months ago

🆕 blog! “Rewriting WordPress's JetPack Related Posts Shortcode”

I like the JetPack related post functionality. But I wanted to customise it far beyond what the default code allows for. So here's how I went from this: To this: Documentation The complete documentation for related posts is pretty easy to follow. This is an adaptation of "Use Jetpack_Rel…

👀 Read more: https://shkspr.mobi/blog/2023/10/rewriting-wordpresss-jetpack-related-posts-shortcode/

#HowTo #jetpack #php #wordpress

Rewriting WordPress's JetPack Related Posts Shortcode
https://shkspr.mobi/blog/2023/10/rewriting-wordpresss-jetpack-related-posts-shortcode/

I like the JetPack related post functionality. But I wanted to customise it far beyond what the default code allows for.

So here's how I went from this:

To this:

Documentation

The complete documentation for related posts is pretty easy to follow.

This is an adaptation of "Use Jetpack_RelatedPosts_Raw to build your own list of Related Posts".

Remove the automatic placement

You can turn off the original "related posts" by adding this to your theme's functions.php:

function jetpackme_remove_rp() {    if ( class_exists( 'Jetpack_RelatedPosts' ) ) {        $jprp = Jetpack_RelatedPosts::init();        $callback = array( $jprp, 'filter_add_target_to_dom' );        remove_filter( 'the_content', $callback, 40 );    }}add_filter( 'wp', 'jetpackme_remove_rp', 20 );

Add the new Related Posts

In your theme's index.php (or wherever else you like) you can add this code to insert the new related posts functionality:

if ( is_single() ) {    echo "<section>";        echo do_shortcode( '[jprelp]' );    echo "</section>";}

Create the new functionality

And this goes in your theme's functions.php file. I've commented it as best I can. Let me know if you need more info.

function jetpackme_custom_related() {    //  Check that JetPack Related Posts exists    if (            class_exists( 'Jetpack_RelatedPosts' )            && method_exists( 'Jetpack_RelatedPosts', 'init_raw' )    ) {            //  Get the related posts            $related = Jetpack_RelatedPosts::init_raw()                ->set_query_name( 'edent-related-shortcode' )                 ->get_for_post_id(                    get_the_ID(),   //  ID of the post                    array( 'size' => 4 )//  How many related items to fetch                );            if ( $related ) {                //  Set the container for the related posts                $output = "<h2 id='related-posts'>The Algorithm™ suggests:</h2>";                $output .=   "<ul class='related-posts'>";                foreach ( $related as $result ) {                    $related_post_id = $result['id'];                    // Get the related post                    $related_post = get_post( $related_post_id );                    //  Get the attributes                    $related_post_title = $related_post->post_title;                    $related_post_date  = substr( $related_post->post_date, 0, 4 ); // YYYY-MM-DD                    $related_post_link  = get_permalink( $related_post_id );                    //  Get the thumbnail                    if ( has_post_thumbnail( $related_post_id) ) {                        $related_post_thumb = get_the_post_thumbnail( $related_post_id, 'full',                             array( "class"   => "related-post-img",                                   "loading" => "lazy" //   Lazy loading and other attributes                            )                         );                    } else {                        $related_post_thumb = null;                    }                    //  Create the HTML for the related post                    $output .= '<li class="related-post">';                    $output .=    "<a href='{$related_post_link}'>";                    $output .=       "{$related_post_thumb}<p>{$related_post_title}</p></a>";                    $output .=    "<time>{$related_post_date}</time>";                    $output .= "</li>";                }                //  Finish the related posts container                $output .="</ul>";            }        //  Display the related posts        echo $output;    }}add_shortcode( 'jprel', 'jetpackme_custom_related' );   //  Shortcode name can be whatever you want

Bit of CSS to zhuzh it up

Feel free to add your own styles. This is what works for me.

.related-posts  {    list-style: none;    padding: 0;    display: inline-flex;    width: 100%;    flex-wrap: wrap;    justify-content: center;}.related-posts > * {    /* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout/Controlling_ratios_of_flex_items_along_the_main_axis#combining_flex-grow_and_flex-basis */    flex: 1 1 0;}    .related-post {        min-width: 10em;        max-width: 20em;        text-align: center;        margin: .25em;        border: .1em var(--color-text);        border-style: solid;        border-radius: var(--border-radius);        position: relative;        display: flex;        flex-direction: column;        min-height: 100%;        overflow: clip;    }        .related-post h3 {            font-size: 1em;            padding-top: .5em;        }        .related-post img {            object-fit: cover;            height: 9em;            width: 100%;            border-radius: 0 1em 0 0;            background: var(--color-text);            display: inline-block;        }        .related-post p {            margin: 0 .25em;        }        .related-post time {            font-size: .75em;            display: block;        }

ToDo

  • Use transients to store the data to prevent repeated slow API calls?
  • Perhaps some teaser text?
  • Adjust the layout so the date always floats to the bottom?

https://shkspr.mobi/blog/2023/10/rewriting-wordpresss-jetpack-related-posts-shortcode/

#HowTo #jetpack #php #wordpress

Terence Eden
2 months ago

🆕 blog! “Improving the WordPress Comments Form with Client-Side Validation”

If you use WordPress's HTML5 comments, there's an annoying little gotcha. There's a four year old bug which prevents client-side form validation. HTML allows <input> elements to have a required attribute. In theory, that means the form shouldn't submit until the input is filled in. Sadly, Word…

👀 Read more: https://shkspr.mobi/blog/2023/10/improving-the-wordpress-comments-form/

#HowTo #HTML #php #wordpress

Improving the WordPress Comments Form with Client-Side Validation
https://shkspr.mobi/blog/2023/10/improving-the-wordpress-comments-form/

If you use WordPress's HTML5 comments, there's an annoying little gotcha. There's a four year old bug which prevents client-side form validation.

HTML allows <input> elements to have a required attribute. In theory, that means the form shouldn't submit until the input is filled in. Sadly, WordPress uses novalidate on the form - as the name suggests it stops any validation.

But! WordPress is very hackable. Here's how to make a comment form which does client-side validation and as a bonus checks that the commentor's URl starts with http:// or https://

In your theme, there should be a file called comments.php - that's what we'll be editing.

We're looking for the part which generates the comments form. It will probably be comment_form( $comments_args ); or comment_form();

We're going to need to create a $comments_args array full of the options we want to set.

The most important is "format" => "xhtml" - that prevents the dreaded novalidate from appearing.

if ( comments_open() || pings_open() ) :    $comments_args = array(        //  Force client side validation         "format" => "xhtml",        "comment_field" => '<label for="comment">Comment:</label>'.                '<textarea required id="comment" name="comment" cols="45" rows="8" maxlength="65525" placeholder="Write something interesting here…"></textarea>',        'fields' => array(            'author' => '<label for="author">Your Name (required):</label>'.                '<input type="text" required id="author" name="author" value="" size="30" maxlength="245" autocomplete="name" placeholder="Dr. Winston O\'Boogie">',            'email' => '<label for="email">Your Email (required):</label>'.                '<input type="email" required id="email" name="email" placeholder="me@example.com">',            'url' => '<label for="url">Your Website (optional):</label>'.                '<input type="url" id="url" name="url" pattern="^https?:\/\/(.*)" placeholder="https://example.com">'        )    );    comment_form( $comments_args );

Save that and upload it to your theme and - hopefully - it will work. You can test it out by leaving me a comment below.

https://shkspr.mobi/blog/2023/10/improving-the-wordpress-comments-form/

#HowTo #HTML #php #wordpress

Bewegungsakademie
2 months ago

Lernt bei uns:
Modul 1: Rolle und Haltung
Modul 2: Gruppe und Rollenkonflikte
Modul 3: Moderationsphasen
Modul 4: Ideen und Wissen einladen
Modul 5: Auswählen und Entscheiden
Modul 6: Ziele
Modul 7: Vorbereitung in der Realität
Modul 8: Checkin und Checkout
Modul 9: 10 Hacks, wenn es schwierig wird
Abschluss
schon heute auf der Website! (Link in Bio)

Oder die kommenden Wochen in abgespeckter Form auf dem Account, wie ihr gut #Moderieren lernt.
Das wichtigste: Übt, übt, übt!

#HowTo #Moderation

null.2600
2 months ago

How to Set Mastodon Privacy Settings

@deco @thedarktangent
1) Mastodon Settings > Public Profile > Privacy and Reach
2) Mastodon Settings > Preferences > Other > Posting Defaults > Posting Privacy

Hope this helps! 🫶

#privacy #privacySettings #mastodonPrivacySettings #howTo

Terence Eden
3 months ago

🆕 blog! “Better Bluetooth Sound Quality on Microsoft Teams in Windows 11”

Here's the problem. The current Bluetooth spec doesn't allow high-quality audio to be sent to a headset when it is also sending audio from the microphone. Instead, it switches to the Hands Free Profile (HFP) which only streams low quality mono sound. It makes Teams calls …

👀 Read more: https://shkspr.mobi/blog/2023/09/better-bluetooth-sound-quality-on-microsoft-teams-in-windows-11/

#bluetooth #HowTo #windows

Better Bluetooth Sound Quality on Microsoft Teams in Windows 11
https://shkspr.mobi/blog/2023/09/better-bluetooth-sound-quality-on-microsoft-teams-in-windows-11/

Here's the problem. The current Bluetooth spec doesn't allow high-quality audio to be sent to a headset when it is also sending audio from the microphone. Instead, it switches to the Hands Free Profile (HFP) which only streams low quality mono sound. It makes Teams calls sound like garbage.

The usual solution in Google Meet, Zoom, and MS Teams is to manually tell the app to use Bluetooth for speakers but a separate mic for input. In my experience, that never works with Teams. It forces HFP even if you choose a different input source. Or it cocks-up the sound somehow.

So here's how to fix it on Windows 11.

Open "Settings" and click on "Bluetooth & devices" and select "Devices":

Then scroll down and click on "More devices and printer settings":

Right-click on your Bluetooth headset and select "Properties":

Open the "Services" tab and un-tick "Hands-free Telephony":

Hit the "OK" button to save your changes.

When you next use Teams, select your Bluetooth headset as the speaker and your laptop's mic as the input. You'll have beautifully clear sound while listening to Barry from accounts talk about this quarter's EBITDA.

https://shkspr.mobi/blog/2023/09/better-bluetooth-sound-quality-on-microsoft-teams-in-windows-11/

#bluetooth #HowTo #windows

Terence Eden
3 months ago

🆕 blog! “How to use the new <search> element with WordPress”

There's a new HTML element in town! You can now use <search> to semantically mark up a search box. It's great for letting screen-readers and other assistive tech know what a form does. It's only supported in WebKit for now - other browsers will get it eventually. The WordPress default search widge…

👀 Read more: https://shkspr.mobi/blog/2023/09/how-to-use-the-new-search-element-with-wordpress/

#HowTo #HTML #php #wordpress

How to use the new

element with WordPress
https://shkspr.mobi/blog/2023/09/how-to-use-the-new-search-element-with-wordpress/

There's a new HTML element in town! You can now use

to semantically mark up a search box. It's great for letting screen-readers and other assistive tech know what a form does.

It's only supported in WebKit for now - other browsers will get it eventually.

The WordPress default search widget hasn't yet updated, but I'm going to show you how you can start using it today!

In your theme, create a new file called searchform.php - WordPress will automatically load it for the search widget.

Add the following to the file:

            Search for:                    

Save that and upload it to your theme's directory.

That's it!

Once the element is widely supported, you can drop the role="search".

Enjoy!

https://shkspr.mobi/blog/2023/09/how-to-use-the-new-search-element-with-wordpress/

#HowTo #HTML #php #wordpress

Terence Eden
3 months ago

🆕 blog! “Using Selenium & Chrome to automatically download Blob files”

The Selenium WebDriver is a brilliant way to programmatically interact with websites. You can write little Python scripts which can click around inside browser windows and do "stuff". I use it to download a file generated by a Javascript Blob and automatically save it to disk. Here's how. Se…

👀 Read more: https://shkspr.mobi/blog/2023/09/using-selenium-chrome-to-automatically-download-blob-files/

#HowTo #python

The Selenium WebDriver is a brilliant way to programmatically interact with websites. You can write little Python scripts which can click around inside browser windows and do "stuff".

I use it to download a file generated by a Javascript Blob and automatically save it to disk. Here's how.

Set up the WebDriver

After you've installed Selenium and the Chrome WebDriver, this is the standard boilerplate to use it in Python:

from selenium import webdriver from selenium.webdriver.chrome.options import Optionsfrom selenium.webdriver.common.keys import Keysfrom selenium.webdriver.common.by import By

Set Up Chrome

You can pass whatever options and arguments you need - I use it in headless mode which means it doesn't display a window.

chrome_options = Options()chrome_options.add_argument('--headless=new')chrome_options.add_argument('--window-size=1920,1080')

Set where to save the files

These options force the blob to download automatically to a specific location.
Note There is no way to set the default file name.

chrome_options.add_experimental_option("prefs", {        "download.default_directory"  : "/tmp/",        "download.prompt_for_download": False,        "download.directory_upgrade"  : True,})

Download the file

This opens the browser, finds the link, then clicks on it. Your XPATH will be different to mine.

driver = webdriver.Chrome(options=chrome_options)driver.get("https://example.com")download_button = driver.find_element(By.XPATH, "//button[@data-integration-name='button-download-data-csv']")download_button.click()

Rename from the default name

As mentioned, there's no way to set a default file name. But if you know what the file is going to be called, you can rename after it has been downloaded.

time.sleep(2) # Wait until the file has been downloaded. Increase if it is a big fileos.rename("/tmp/example.csv", "/home/me/newfile.csv")#       Stop the driverdriver.quit()

And there you go. Stick that in a script and you can automatically download and rename Blob URls.

#HowTo #python

https://shkspr.mobi/blog/2023/09/using-selenium-chrome-to-automatically-download-blob-files/

Logo of the Python programming language.
dasgrueneblatt
3 months ago

Is there a way to view/follow groups of #hashtags together in a separate timeline, similar to putting groups of people on lists?

The only way I can see is to have several accounts that follow different hashtags.

Maybe there's a client software that allows to filter the timeline by groups of hashtags?

#AskFedi #AskMastodon #Photography #ActivityPub #timeline #lists #hashtag #howto

:boost:

David August
3 months ago

I've just written this helpful how to for the times we live in: "How to Avoid Guillotine Wrist."

Read here: https://bit.ly/HowToAvoidGuillotineWrist

#HowTo #GuillotineWrist #RevolutionaryErgonomics #revolution #ergonomics #ErgonomicUprising #RepetitiveStress #RepetitiveMotion #satire #humor

A black button with orange lit highlights and the words "Press to Cut" written on it.