CWSmith, to mastodon
@CWSmith@social.mechanizedarmadillo.com avatar

Does anyone have a good post for generating a post bot? All I keep finding never really seems to make a lot of sense.




reiver,
@reiver@mastodon.social avatar

@CWSmith

How familiar are you with using HTTP based APIs?

https://docs.joinmastodon.org/methods/statuses/#create

Are you familiar with how to do an HTTP POST on a URL, using whatever programming language you are using?

ArtofCycling, to art
@ArtofCycling@mastodon.world avatar
jwildeboer, (edited ) to 3DPrinting
@jwildeboer@social.wildeboer.net avatar

I finally gave in and ordered 200 small but strong magnets to up my 3D printing game to cool gadgets that can open and close with the power of invisible attraction :)

#3DPrinter #Magnets #Create

SabiLewSounds, (edited ) to ArtificialIntelligence
@SabiLewSounds@mastodon.social avatar

Did you know that based platforms like have "tools" for creators to know when their audience is usually active so they can plan when to post for more "engagement?"

Guess who can't access those kind of "helpful tools" because it's inaccessible - cognitively broken me

More in this hoot train

Love a rant from my janky insta posts...

SabiLewSounds, (edited )
@SabiLewSounds@mastodon.social avatar

As a I make "content" when I am able, when I have the energy or and because of my I cannot plan when to push out or even future content especially when I'm fighting my mechanisms daily

I make shit when and if I can, the more safe I feel the more I can do what I need and what I love

https://ko-fi.com/sabilewsounds

More hoots incoming

haloandherb, to legal
@haloandherb@handmade.social avatar

Love my work but not ready for Patreon? ☕️ Show your support with a 'coffee' at https://ko-fi.com/haloandherb or snag a unique treasure from my Etsy store https://haloandherb.etsy.com 🌿 Your support means the world! Shares & referrals are super appreciated! 💖

janriemer, to random

When people start something new and small, it always has this "pure" vibe to it.

It is raw and authentic - made for oneself and one's community, not for the masses.

I love it!❤️

New pathways just waiting to be discovered around the corner.

Keep creating and learning!✨

#KeepCreating #Create #Passion #StartSomethingNew #Inspiration

cheeaun, to random
@cheeaun@mastodon.social avatar

This is probably too hacky but can't help trying it out. Phanpy's shortcuts settings are saved as (private) notes on my own profile, which will allow export/import in the "cloud".

It's possible to use the API to add notes for other profiles, and they're hidden from (self, currently-logged-in) own profile. I'm using it to store data 🤪

NOT available on the dev site yet, still on my local machine.

Demo of the "cloud" import/export feature for Shortcuts Settings on Phanpy.

thisismissem,
@thisismissem@hachyderm.io avatar

@nikclayton @cheeaun @eloquence for drafts, the current hack is using scheduled status with a ridiculously long timestamp (e.g., 9999-12-31T00:00:00.000Z) — https://docs.joinmastodon.org/methods/statuses/#create

masterdon1312, to music
@masterdon1312@mastodon.social avatar

almost at the point of looking into making some electro soon, but not like all the other yuppie mainstream stuff, the need to , just give it away for

tonewrecker, to art

.
Embrace the modern
Magic wallet switching tech
Value for Value
.
Check podcastindex.org/apps


chikorita157, to Meme
@chikorita157@sakurajima.social avatar

This is why you use Sharkey and not Mastodon. You won't get these strange sports betting users trying to sign up for your instance just to advertise their betting site.

Sharkey does what Mastdon't. ​:sylveonsmug:​

(But no joke, we get these accounts every day and I have to end up suspending them).

RE: https://sakurajima.moe/users/chikorita157/statuses/111739740968429662

chikorita157,
@chikorita157@sakurajima.social avatar

@NaraMoore Might be possible that Mastodon and Pixelfed allows signups through the API

Sharkey/Misskey does not have this API. Judging from previous spam accounts, it may be automated.

https://docs.joinmastodon.org/methods/accounts/#create

BenHigbie, to art
@BenHigbie@mastodon.social avatar
BenHigbie, to Artist
@BenHigbie@mastodon.social avatar
markwalker, to random
@markwalker@fosstodon.org avatar

Yesterday, thanks to another superb PR to django-nh3, I discovered that you can add your coverage report to the summary for your github actions job.

Here's some info about what you can do with this; https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/#create-summaries

And here's the action change;
https://github.com/marksweb/django-nh3/commit/508a2d89f8563e4d2e346b37a3aa55e120f4e255#diff-7829468e86c1cc5d5133195b5cb48e1ff6c75e3e9203777f6b2e379d9e4882b3R82

mbootsman, to mastodon Dutch
@mbootsman@toot.re avatar

Hey #MastoAdmins or #Mastodon devs! I'm building a PHP listener to receive Web Push notifications from Mastodon.

I'm receiving the notification in the listener, but it is encrypted. I've been hurting my head to find a way to decrypt it, and the docs do not mention anything about how to decrypt a notification. Any help and boosts are appreciated.

michael,
@michael@thms.uk avatar

@mbootsman From these docs, it looks like you need to send a couple of keys when you create the subscription: https://docs.joinmastodon.org/methods/push/#create

subscription[keys][p256dh] and subscription[keys][auth] I believe you need to mangle those two together somehow to generate your decryption key. It's complicated and I've never done it myself.

I think there are two more pointers I can give:

  1. https://github.com/mastodon/webpush-apn-relay/tree/master/iOS Is swift example code to decrypt a mastodon web push notification. If you understand Swift, that might help.

  2. https://github.com/web-push-libs/web-push-php is a PHP library that deals with sending WebPush notifications, including iirc encryption. So that might give you some hints on the decryption aspect of it.

But in short: decrypting webpush notifications is complex, and because it's usually done by a browser, there are no examples on how to do it in PHP that I’m aware of.

CatherineBabault, to art
@CatherineBabault@mstdn.ca avatar

I took this photo at my favourite spot for abstract compositions. I keep going back there whenever the light is right and the sky is blue. I usually lost track of time and get completely absorbed by the reflections in the water. People walk by wondering why I photograph the water. They don't see what I see and that's fine with me.

tuxedocomputers, to linux German
@tuxedocomputers@linuxrocks.online avatar

💡 𝗞𝗻𝗼𝘄𝗹𝗲𝗱𝗴𝗲 𝗶𝘀 𝗽𝗼𝘄𝗲𝗿 💡

Have you ever wondered how to create and start a live stick medium? Then you've come to the right place: We have written a guide 📒 in which you can read how to create a live stick under TUXEDO OS or under other operating systems. Whether graphically or in the terminal.

👉 Have fun reading: https://www.tuxedocomputers.com/en/Infos/Help-and-Support/Instructions/How-do-I-create-and-start-a-Live-Medium.tuxedo

SteveHendersonFineArt, to art
@SteveHendersonFineArt@mastodon.social avatar

Many creative projects demand that we give them time and attention. And why not? When we're doing something that interests us, why rush through it? The very act of creating provides as much satisfaction as the finished product.

These Gifts Are Better Than Toys greeting card -- https://2-steve-henderson.pixels.com/featured/these-gifts-are-better-than-toys-steve-henderson.html?product=greeting-card

bellhoss, to ukteachers

Hi I’m Becky (she/they) and my #indierock #band is bellhoss but I also love to #create bad #visualart and my day job is in #k12 #education in #careerandtechnicaleducation
#introduction

timonsku, to debian
@timonsku@mastodon.social avatar

You know what irks me the most about this change to pip behaviour in Debian. Linux is such a foot gun by design, you can do anything you want with usually no resistance or warning by the distro or kernel but this is where the line is drawn??

It's not like you couldn't have gone the other way and wrap system python packages into their venv.

Let people do unwise things, there are so many better defaults they could have chosen (redirect to local user with warning).

timonsku,
@timonsku@mastodon.social avatar

@carmenbianca This is actually the proposed solution for distros in the very PEP referenced by this message.
https://peps.python.org/pep-0668/#create-separate-distro-and-local-directories

Have separate distro and system user directories but for in-explicable reason this only happens if you compile and install upstream python yourself.
There is no reason that this could not be done as a default and have separate distro and user python installs. Which would be the sane thing to do.

timonsku,
@timonsku@mastodon.social avatar

Whats even worse the obvious and nicer solution is actually proposed in the very PEP?!
https://peps.python.org/pep-0668/#create-separate-distro-and-local-directories

Like yes, please do that, why aren't you doing that. Why do I first have to compile and install upstream Python for that to go into affect?!

And also to be clear because people bring that up all the time, this message comes up in any case, not just when running pip as root. Instead of installing the packages locally you still get presented with this message, its absurd.

THEDAILYHAIKU, to Haiku
@THEDAILYHAIKU@mastodon.world avatar

SLOW RENGA WEDNESDAY 11/10/23 Start each with the same first lines below: ENDLESS SKY… or SUCH BEAUTY… Post haiku in comments, as ever enjoy mulling over the first line & considering your options at different points during the evening or day depending on your time zone. Look forward to reading your haiku - seeing where these lines take you.

image/png
image/png

ChrisBoese, to art
@ChrisBoese@newsie.social avatar
NaturaArtisMagistra,
@NaturaArtisMagistra@mastodon.world avatar

@ChrisBoese https://mastodon.world/@NaturaArtisMagistra/110715043450799901 A.I. cannot meditate, has no subconscious, no intuition, no dreams, no pulse, no compassion, no impassion, no tears, no laughter, no love, no hate. A.I. would not live or die for you.

A.I. cannot be an indigenous, atheist, Buddhist, Hindu, Jain, Jew, Catholic, Christian or Muslim artist.

◾️

All from a place of -mind, from . ― Eckhart Tolle. Including actors.

Richard_Littler, to random
@Richard_Littler@mastodon.social avatar

I'm seeing more and more people, especially non-artists, saying things like 'My AI art skills are really improving,' as if AI is a discipline such as drawing, painting or whatever.
Like people in 1981 who pricked the cellophane on their frozen ready-meals, popped them in the microwave and said 'My cooking skills are really improving. Maybe I'm a chef now.'

NaturaArtisMagistra,
@NaturaArtisMagistra@mastodon.world avatar

@Richard_Littler
https://mastodon.world/@NaturaArtisMagistra/110715043450799901 A.I. cannot meditate, has no subconscious, no intuition, no dreams, no pulse, no compassion, no impassion, no tears, no laughter, no love, no hate. A.I. would not live or die for you.

A.I. cannot be an indigenous, atheist, Buddhist, Hindu, Jain, Jew, Catholic, Christian or Muslim artist.

◾️

All from a place of -mind, from . ― Eckhart Tolle. Including actors.

blog, to HowTo
@blog@shkspr.mobi avatar

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:

The old layout has three items, with small images and indistinct text.

To this:

The new layout has 4 items, each boxed off, with a larger image and more distinct text.

Documentation

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

This is an adaptation of "Use ".

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/

UniversalReflections, to linuxgaming
@UniversalReflections@linuxrocks.online avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • ngwrru68w68
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • slotface
  • everett
  • vwfavf
  • kavyap
  • megavids
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • tacticalgear
  • InstantRegret
  • cisconetworking
  • cubers
  • tester
  • anitta
  • modclub
  • Leos
  • normalnudes
  • JUstTest
  • All magazines