There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

kbin.life

weariedfae , to nostupidquestions in Is this normal for girls or just a extreme edge case? (Serious question)

This is the modem equivalent format for an ancient dirty joke. Back in the day kids you could find collections of them in printed books, and later, entire websites solely dedicated to hosting thousands of dirty jokes. They were presented in story format, often happening to your cousin’s friend.

Not saying no one had ever had this happen to them in the history of mankind. But this is also an old dirty joke that is probably more commonly repeated than acted out.

bionicjoey ,

This is the modem equivalent

Nice keming

weariedfae ,

Lol good catch. It was totally on purpose and not swipe being swipe. Yep.

RumorsOfLove , to nostupidquestions in Is this normal for girls or just a extreme edge case? (Serious question)

did you catch Poor Things?

200ok , to asklemmy in Toy/game makers often list skills children learn while playing them. What skills would adult games develop?

Patience

200ok , to asklemmy in Toy/game makers often list skills children learn while playing them. What skills would adult games develop?

Cooperation

200ok , to asklemmy in Toy/game makers often list skills children learn while playing them. What skills would adult games develop?

Deception

JohnDClay , to memes in Private Capital vs Central Planning

China managed to overbuild high speed rail, they got so good at it. Their whole system is built to incentive huge infrastructure projects. Which has been good, but now they’re getting way into the diminishing returns.

yogthos OP ,
@yogthos@lemmy.ml avatar
Annoyed_Crabby ,

They’re so good at it and got addicted to it they want to build it on other countries too!

arran4 , to technology in Is there a Git repository activity aggregator, like GitHub's user activity but platform independent?

I asked chatgpt to write a go program for this, this looks roughly correct (I have used both libraries before) obviously this won’t be enough for your particular use case. I imagine you can integrate an RSS feed to your site, however if you’re using something like hugo perhaps output it as a csv.

Super low effort but a good start I think:


<span style="font-weight:bold;color:#a71d5d;">package</span><span style="color:#323232;"> main
</span><span style="color:#323232;">
</span><span style="font-weight:bold;color:#a71d5d;">import </span><span style="color:#323232;">(
</span><span style="color:#323232;">	</span><span style="color:#183691;">"fmt"
</span><span style="color:#323232;">	</span><span style="color:#183691;">"log"
</span><span style="color:#323232;">	</span><span style="color:#183691;">"os"
</span><span style="color:#323232;">	</span><span style="color:#183691;">"strings"
</span><span style="color:#323232;">	</span><span style="color:#183691;">"time"
</span><span style="color:#323232;">
</span><span style="color:#323232;">	git </span><span style="color:#183691;">"github.com/go-git/go-git/v5"
</span><span style="color:#323232;">	rss </span><span style="color:#183691;">"github.com/jteeuwen/go-pkg-rss"
</span><span style="color:#323232;">)
</span><span style="color:#323232;">
</span><span style="font-weight:bold;color:#a71d5d;">const </span><span style="color:#323232;">(
</span><span style="color:#323232;">	timeout </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">5 </span><span style="font-style:italic;color:#969896;">// timeout in seconds for the RSS feed generation
</span><span style="color:#323232;">)
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">// Repository represents a git repository with its URL
</span><span style="font-weight:bold;color:#a71d5d;">type </span><span style="color:#323232;">Repository </span><span style="font-weight:bold;color:#a71d5d;">struct </span><span style="color:#323232;">{
</span><span style="color:#323232;">	URL </span><span style="font-weight:bold;color:#a71d5d;">string
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">// Repositories is the list of git repositories
</span><span style="font-weight:bold;color:#a71d5d;">var </span><span style="color:#323232;">Repositories </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">[]Repository{
</span><span style="color:#323232;">	{URL: </span><span style="color:#183691;">"https://github.com/owner/repo1"</span><span style="color:#323232;">},
</span><span style="color:#323232;">	{URL: </span><span style="color:#183691;">"https://github.com/owner/repo2"</span><span style="color:#323232;">},
</span><span style="color:#323232;">	</span><span style="font-style:italic;color:#969896;">// Add more repositories here
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">// FetchLatestTag fetches the latest tag from a git repository
</span><span style="font-weight:bold;color:#a71d5d;">func </span><span style="font-weight:bold;color:#795da3;">FetchLatestTag</span><span style="color:#323232;">(repoURL </span><span style="font-weight:bold;color:#a71d5d;">string</span><span style="color:#323232;">) (</span><span style="font-weight:bold;color:#a71d5d;">string</span><span style="color:#323232;">, </span><span style="font-weight:bold;color:#a71d5d;">string</span><span style="color:#323232;">, </span><span style="font-weight:bold;color:#a71d5d;">error</span><span style="color:#323232;">) {
</span><span style="color:#323232;">	</span><span style="font-style:italic;color:#969896;">// Clone the repository to a temporary directory
</span><span style="color:#323232;">	dir, err </span><span style="font-weight:bold;color:#a71d5d;">:=</span><span style="color:#323232;"> os.MkdirTemp(</span><span style="color:#183691;">""</span><span style="color:#323232;">, </span><span style="color:#183691;">"repo"</span><span style="color:#323232;">)
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil </span><span style="color:#323232;">{
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#183691;">""</span><span style="color:#323232;">, </span><span style="color:#183691;">""</span><span style="color:#323232;">, err
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">defer</span><span style="color:#323232;"> os.RemoveAll(dir)
</span><span style="color:#323232;">
</span><span style="color:#323232;">	_, err </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> git.PlainClone(dir, </span><span style="color:#0086b3;">true</span><span style="color:#323232;">, </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">git.CloneOptions{
</span><span style="color:#323232;">		URL:      repoURL,
</span><span style="color:#323232;">		Progress: os.Stdout,
</span><span style="color:#323232;">	})
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil </span><span style="color:#323232;">{
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#183691;">""</span><span style="color:#323232;">, </span><span style="color:#183691;">""</span><span style="color:#323232;">, err
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">
</span><span style="color:#323232;">	repo, err </span><span style="font-weight:bold;color:#a71d5d;">:=</span><span style="color:#323232;"> git.PlainOpen(dir)
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil </span><span style="color:#323232;">{
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#183691;">""</span><span style="color:#323232;">, </span><span style="color:#183691;">""</span><span style="color:#323232;">, err
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">
</span><span style="color:#323232;">	tags, err </span><span style="font-weight:bold;color:#a71d5d;">:=</span><span style="color:#323232;"> repo.Tags()
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil </span><span style="color:#323232;">{
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#183691;">""</span><span style="color:#323232;">, </span><span style="color:#183691;">""</span><span style="color:#323232;">, err
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">var </span><span style="color:#323232;">latestTag </span><span style="font-weight:bold;color:#a71d5d;">string
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">var </span><span style="color:#323232;">latestCommitTime time.Time
</span><span style="color:#323232;">
</span><span style="color:#323232;">	err </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> tags.ForEach(</span><span style="font-weight:bold;color:#a71d5d;">func</span><span style="color:#323232;">(ref </span><span style="font-weight:bold;color:#a71d5d;">*</span><span style="color:#323232;">plumbing.Reference) </span><span style="font-weight:bold;color:#a71d5d;">error</span><span style="color:#323232;"> {
</span><span style="color:#323232;">		tag :</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> ref.Name().Short()
</span><span style="color:#323232;">		commit, err :</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> repo.CommitObject(ref.Hash())
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil</span><span style="color:#323232;"> {
</span><span style="color:#323232;">			</span><span style="font-weight:bold;color:#a71d5d;">return</span><span style="color:#323232;"> err
</span><span style="color:#323232;">		}
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> commit.Committer.When.After(latestCommitTime) {
</span><span style="color:#323232;">			latestCommitTime </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> commit.Committer.When
</span><span style="color:#323232;">			latestTag </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> tag
</span><span style="color:#323232;">		}
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#0086b3;">nil
</span><span style="color:#323232;">	})
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil </span><span style="color:#323232;">{
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#183691;">""</span><span style="color:#323232;">, </span><span style="color:#183691;">""</span><span style="color:#323232;">, err
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">return</span><span style="color:#323232;"> latestTag, latestCommitTime.Format(time.RFC1123Z), </span><span style="color:#0086b3;">nil
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">// GenerateRSS generates an RSS feed from the latest tags of the repositories
</span><span style="font-weight:bold;color:#a71d5d;">func </span><span style="font-weight:bold;color:#795da3;">GenerateRSS</span><span style="color:#323232;">() </span><span style="font-weight:bold;color:#a71d5d;">string </span><span style="color:#323232;">{
</span><span style="color:#323232;">	feed </span><span style="font-weight:bold;color:#a71d5d;">:=</span><span style="color:#323232;"> rss.Feed{
</span><span style="color:#323232;">		Title:       </span><span style="color:#183691;">"Latest Tags from Git Repositories"</span><span style="color:#323232;">,
</span><span style="color:#323232;">		Link:        </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">rss.Link{Href: </span><span style="color:#183691;">"http://example.com/"</span><span style="color:#323232;">},
</span><span style="color:#323232;">		Description: </span><span style="color:#183691;">"This feed provides the latest tags from a list of git repositories."</span><span style="color:#323232;">,
</span><span style="color:#323232;">		Created:     time.Now(),
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">for </span><span style="color:#323232;">_, repo </span><span style="font-weight:bold;color:#a71d5d;">:= range</span><span style="color:#323232;"> Repositories {
</span><span style="color:#323232;">		tag, date, err </span><span style="font-weight:bold;color:#a71d5d;">:= </span><span style="color:#323232;">FetchLatestTag(repo.URL)
</span><span style="color:#323232;">		</span><span style="font-weight:bold;color:#a71d5d;">if</span><span style="color:#323232;"> err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil </span><span style="color:#323232;">{
</span><span style="color:#323232;">			log.Printf(</span><span style="color:#183691;">"Error fetching latest tag for repository </span><span style="color:#0086b3;">%s</span><span style="color:#183691;">: </span><span style="color:#0086b3;">%v</span><span style="color:#183691;">"</span><span style="color:#323232;">, repo.URL, err)
</span><span style="color:#323232;">			</span><span style="font-weight:bold;color:#a71d5d;">continue
</span><span style="color:#323232;">		}
</span><span style="color:#323232;">		feed.Items </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#62a35c;">append</span><span style="color:#323232;">(feed.Items, </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">rss.Item{
</span><span style="color:#323232;">			Title:       fmt.Sprintf(</span><span style="color:#183691;">"Latest tag for </span><span style="color:#0086b3;">%s</span><span style="color:#183691;">: </span><span style="color:#0086b3;">%s</span><span style="color:#183691;">"</span><span style="color:#323232;">, repo.URL, tag),
</span><span style="color:#323232;">			Link:        </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">rss.Link{Href: repo.URL},
</span><span style="color:#323232;">			Description: fmt.Sprintf(</span><span style="color:#183691;">"The latest tag for repository </span><span style="color:#0086b3;">%s</span><span style="color:#183691;"> is </span><span style="color:#0086b3;">%s</span><span style="color:#183691;">, created on </span><span style="color:#0086b3;">%s</span><span style="color:#183691;">."</span><span style="color:#323232;">, repo.URL, tag, date),
</span><span style="color:#323232;">			Created:     time.Now(),
</span><span style="color:#323232;">		})
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">var </span><span style="color:#323232;">rssFeed strings.Builder
</span><span style="color:#323232;">	rssFeed.WriteString(xml.Header)
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">err </span><span style="font-weight:bold;color:#a71d5d;">:=</span><span style="color:#323232;"> feed.Write(</span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">rssFeed); err </span><span style="font-weight:bold;color:#a71d5d;">!= </span><span style="color:#0086b3;">nil </span><span style="color:#323232;">{
</span><span style="color:#323232;">		log.Fatalf(</span><span style="color:#183691;">"Error generating RSS feed: </span><span style="color:#0086b3;">%v</span><span style="color:#183691;">"</span><span style="color:#323232;">, err)
</span><span style="color:#323232;">	}
</span><span style="color:#323232;">
</span><span style="color:#323232;">	</span><span style="font-weight:bold;color:#a71d5d;">return</span><span style="color:#323232;"> rssFeed.String()
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="font-weight:bold;color:#a71d5d;">func </span><span style="font-weight:bold;color:#795da3;">main</span><span style="color:#323232;">() {
</span><span style="color:#323232;">	rssFeed </span><span style="font-weight:bold;color:#a71d5d;">:= </span><span style="color:#323232;">GenerateRSS()
</span><span style="color:#323232;">	fmt.Println(rssFeed)
</span><span style="color:#323232;">}
</span>
some_guy , to memes in Priorities, right?

I don’t understand. But maybe fuck off with this bullshit. Lemmy is doing fine.

ClanOfTheOcho , to youshouldknow in YSK how to eBay - in depth

With fees that high, what was your typical profit margin per sale? How were you able to source product at such a high discount?

j4k3 OP ,
@j4k3@lemmy.world avatar

Check other comments in post. Margin was complex and distributed.

kittenzrulz123 , to linux in Buying a new computer to run Linux on - suggestions?

Get a Librebooted Thinkpad T440p or similar and then upgrade it (SSD, 16gb ram, etc).

lud ,

Or a normal booted ThinkPad if you don’t really care about that (I personally don’t) it will be able to run Linux regardless.

kittenzrulz123 ,

Yeah but if a laptop is old enough to support Libreboot that means it was released before Lenovo messed it up

lud ,

How did they mess up?

Also isn’t a laptop from 2014 (?) kinda pushing it when it comes to laptops?

I can’t be much more expensive to get a laptop that’s much better in pretty much every way.

Unrelated but I really wish modern ThinkPads had a think light.

kittenzrulz123 ,

I’m pretty sure the T440p is the newest one and it’s 2013. They messed up in the sense that modern Thinkpads are starting to solder components and overall the build quality is worse.

lud ,

Maybe the build quality is a bit worse but it’s not bad. My x280 is doing great and I would absolutely not replace it with an older machine (even if that machine had a think light)

And I much rather have soldered components from 2018 (or something) than non soldered from a decade ago

But sure, there is nothing wrong with running old machines yourself. I just wouldn’t recommend it to people that ask for a laptop unless they specifically request it.

kittenzrulz123 ,

Repairability and upgradability are incredibly important factors, when my computer breaks why should I need to buy a new one? Heck why should it break at all, old computers were built to last.

lud ,

I agree. I have even replaced the screen on my x280 to a IPS screen (because the old one was a crap TN screen) and the storage.

I wish newer machines were more repairable and I would buy a framework if I could afford it and if they had more ports. Fortunately most machines don’t break that often and very rarely is it in a part that couldn’t be replaced by a skilled technician (excluding some shitty products like Apple computers). Most business tier laptops like Lenovo ThinkPads and Dell Latitudes (5xxx and 7xxxx series at least) are fairly repairable and durable.

Upgradability is also great but doesn’t make a lot of sense to worry about when the machine is a decade old and still crap performance wise even if you gave it a few more GBs of RAM. You can’t really upgrade anything beyond storage and ram in any laptops unfortunately.

I wouldn’t consider a decade old computer no matter how repairable, durable, or how upgradable it is unless I worked exclusively in a TTY or some shit and I believe most feel the same way.

You do you, but I still don’t think it’s a good suggestion for someone that just needs a computer. Especially when they want good battery life and compactness. Neither of which computers that old are good at.

Ghostalmedia , to technology in Bitcoin is Stupid and Does Not Deserve an Emoji (blog post)
@Ghostalmedia@lemmy.world avatar

I think I should post a 1000 word essay about why I dislike the merman emoji.

yesman , to science_memes in Neck Bone

Breakfast at 7, lunch at 12, dinner at 5. This is how I learned the number of vertebrae in A&P.

7 Cervical, 12 thoracic, and 5 lumbar.

flambonkscious ,

That’s awesome

tiredofsametab ,

Yeah, Doc, I'm not sure what's wrong with me, but it seems like I have an early breakfast or a late dinner...

K1nsey6 , to nostupidquestions in If you could substract* a leader from this world which one would you choose ?
@K1nsey6@lemmy.world avatar

Capitalism

savvywolf , to retrogaming in The Legend of Banjo-Kazooie: The Jiggies of Time
@savvywolf@pawb.social avatar

patch.wedarobi.com Tool where you can provide your own ROM and it’ll apply the patch for this game (and others).

Played this a while ago, and it was really good! Would recommend giving it a go.

AShadyRaven , to linux_gaming in Latest Verge article about their review of Asus ROG Ally X (and this is why gamers are preferring Steam Deck)

Eventually Microsoft is going to be forced to adapt and make an operating system that doesnt use 20% of your system resources, right?

surely they wont continue to make the same bloated, sluggish OS every year since windows 7 right?

ByteOnBikes ,

I strongly believe they will do that. Then a week later, slowly introduce bloat again.

AShadyRaven ,

ah yes, the internet explorer/chrome/firefox but then firefox got better but then worse again/chrome/is internet explorer good now?/opera/operagx/Microsoft edge is actually fast now/back to opera effect

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines