TIL you can use the #JavaScript `fetch()` API with `data:` URIs!
This means if you're using `fetch()` to load a URL in an application, a person can supply a data URI and skip the network entirely.
In particular this can make specifying data in query strings in a URL handle both remote URLs and inline data without an extra code path. 🤯
https://stackoverflow.com/questions/66573468/why-can-i-fetch-data-uris
uspol / Wait, does the tiktok ban bill really ban VPNs?
Remember, the Tik Tok ban was originally proposed by Donald Trump, and I sincerely believe he did so because he was unpopular on Tik Tok and young people were using it to create posts causing problems for his campaign. Putin has long suppressed dissidents and journalists in Russia (and proxy states) by finding ways to define them as "foreign agents". Trump or DeSantis, students of Putin's techniques, would obviously not hesitate to try same.
It also just looks cool as hell:
https://github.com/samuelmtimbo/unit/blob/main/public/gif/start/34.gif
It'd be nice if the web had a standard API for apps to register and configure keyboard shortcuts for #accessibility use cases.
E.g. right now Github has their own shortcuts, but if somebody wanted to hook them up to an alternative input interface for people with dexterity issues, Github would need to do it manually, or the user would need to stumble through it until they found a way to get at the shortcuts.
IMO every action on a page should be easy to navigate to with a reader or keyboard.
Once again bringing folks attention to https://unit.land which is a live visual #programming environment using #JavaScript under the hood.
One thing I find interesting is that it's a lot more mobile friendly than others. I'm thinking it'll be easier to use on my steam deck than on a phone or tablet with the joysticks / buttons.
The docs recently got updated so it's a bit more approachable: https://github.com/samuelmtimbo/unit/tree/main/src/docs/start
Practicing using #zsh after using plain old bash all my life. It's a bit of getting used to, but the main thing is I'm not looking forward to having to figure out how to customize my color scheme again. 😂
I just installed #fdroid on my #Android phone and now I'm outraged. This existed the whole time I've had an Android and I was led to believe I could only install apps from the #Google Play Store!? 😒 #tech #OpenSource
Fucked up how capitalism incetivises governments to avoid giving people free food/shelter/medicine just so they can keep getting forced to destroy their bodies for jobs nobody would do otherwise.
One of the most successful aspects of it tbh! That's what people must mean when they say "It's the best system we have".
My brain is kinda exhausted from first wrestling with Linux and Ansible automation, and then wrestling with JavaScript type hell in trying to get some p2p libraries to work.
Gonna decompress before bed by live-coding a lil #p2p #gemini #microblog in #agregore with some basic #JavaScript and #HTML
So if you haven't yet, try installing the latest pre-release of Agregore and follow along.
https://github.com/AgregoreWeb/agregore-browser/releases/tag/v2.0.0-12
Alright! Now that v2.0.0 of Agregore is out, the rendering should be fixed up and it can auto-resolve `index.gmi` under hyper://gem.mauve.moe/ when you visit. You can render the raw directory listing by adding `?noResolve` to the end of the URL such as hyper://gem.mauve.moe/?noResolve
Hey folks! The 2.0.0 release of #Agregore has been tagged and compiled! This features fixes for #MacOS, an upgraded #Hypercore-Protocol, and better support for #Gemini when loading it from #p2p protocols. This also involves an upgrade of Electron to 23 and an overhaul to using ESM for the #JavaScript back ends.
Download it and check it out for yourself!
https://github.com/AgregoreWeb/agregore-browser/releases/tag/v2.0.0
I'm gonna go fix this mime type issue and add the ability to resolve `index.gmi` and make sure the mime types for `.gemini` and `.gmi` work correctly accross protocols.
But hopefully this has shown folks that it's pretty easy to to get something p2p out there.
Now that I have some basics in there, lemme add a DNS address: hyper://gem.mauve.moe/index.gmi
I use namecheap for DNS but you should be able to use whatever you want as long as it supports DNS TXT records.
```
TXT _dnslink.gem dnslink=/hyper/sqtc3rcay8hcg3y8ehcrc66zpiceufstcwupukrggf5eukwp7xdo
```
And bam! I now have a nice looking URL for my blog and it just took a few commands in my devtools and a single DNS record. No servers required!
K, lets delete the old file and make a new one:
```
await fetch('README.gemini', {method: 'delete'})
await fetch('/index.gmi', {
method: 'PUT',
body: `
# Mauve's Gemblog!
Wow this sure is something.
Way more advanced than my HTML based blog!
=> https://blog.mauve.moe
`
})
```
hyper://sqtc3rcay8hcg3y8ehcrc66zpiceufstcwupukrggf5eukwp7xdo/index.gmi
Honestly, this is all you need to get a basic blog up and running. From here you an change the URL in the `fetch()` API call to whatever page you want and add the gemtext into the `body`. Each time you'll be overwriting what was there before.
Whoops! I got the file extension wrong. Seems it's just loading it as Markdown. :P Most of the formatting works anyway. Hopefully folks looking at this in the future will see the fixed version. Also I think I got the file extension wrong?
Navigating to the URL will give me an empty index. So first thing I'll do is add my "homepage" under `/README.gemini`. Sadly I don't have a thing to resolve `index.gemini` yet, but I wanna add that next time I get a chance. Gonna read these docs to brush up on my gemtext: gemini://gemini.circumlunar.space/docs/gemtext.gmi
```
res = await fetch('/README.gemini', {
method: 'PUT',
body: `# Mauve's Gemblog!`
})
await res.text()
```
Now I can reload and click to open the page
Occult Enby that's making local-first software with peer to peer protocols, mesh networks, and the web.
Exploring what a local-first cyberspace might look like in my spare time.