anatudor, to programming

So... stupid question: how can I copy a string to clipboard in Safari?

Tried:

navigator.clipboard.writeText(myString)

This works in Chrome & Firefox, but navigator.clipboard is undefined in Safari.

window.clipboardData is also undefined in Safari.

So... how can I do it?

Thanks!

nucliweb, to javascript
@nucliweb@webperf.social avatar
chris_hayes, to javascript
@chris_hayes@fosstodon.org avatar

I'm trying out https://runjs.app for prototyping js/node.js snippets locally.
Creating a new node project every time I just want to run a quick node.js snippet is just too time consuming.

Interested in any suggestions of similar tools js devs recommend. I know repl.it is another option, but running locally is a requirement for me.

mjgardner, (edited ) to programming
@mjgardner@social.sdf.org avatar

This is hilarious. A #Google engineer invented #zx to make command line scripting easier with #NodeJS, because at a certain point #shell scripts get too complicated and you need a Real #Programming Language.

https://github.com/google/zx/

This is exactly #Perl’s use case from thirty-six years ago. But the kids want #JavaScript everywhere and would rather it take more work to convert their ascended #Bash scripts to a vastly different syntax.

https://github.com/google/zx/issues/581#issuecomment-1516573139

#Unix #Linux #ProgrammingLanguages

mjgardner,
@mjgardner@social.sdf.org avatar

https://fuckgov.org/@h Oh, I don’t deny it’s useful. And you’ll never catch me saying it’s bad to stick with what you know if it gets the job done—that’s one reason I continue to use .

My main point was that it’s less work converting to Perl than to .

The “kids want JavaScript everywhere” was admittedly a little snark directed at the “continuous amnesia” of prior art (not unique to developers but their sheer number means it’s really prevalent) as described here: https://www.ufried.com/blog/continuous_amnesia_issue/

Kevan, to programming

Early in 2023, I stood up an instance off my main domain to check out Mastodon and see if the rumors were true: did it really feel like early Twitter and the short lived ADN?

The answer is yes, it most certainly does, so I while I wanted to continue to engage and meet people,my domain kinda sucked and I never gave a proper .

Now I want to check out Calckey!

My name is Kevan and I'm kind of from all over the US, but I've been in since 2007.

I moved here for college and never left. I came to study and with the idea I'd and perform on .

None of those things panned out: I wound up with a degree in and and found my way into tech with (, ) and .

I thought for a long time I'd wind up in , but my stint running at BallotReady during the 2020 election—while the thing I'm most proud of professionally—broke me of that fantasy.

I'm current the VP of Product for a commerce focused . Fortunately, I work from home because this is loud AF.

, , , listening to on , reading and writing on fancy paper with a (mostly and ) are my hobbies. And I try to spend as much of my time with Toby, my (is a thing or do you all just use ?) as I can.

notwoods, to webdev
@notwoods@hachyderm.io avatar

Quick TIL post: I learned you can natively display math formulas with just , no or required!
https://tigeroakes.com/posts/til-math-latex-without-css/

bigcalm, to javascript
@bigcalm@mendeddrum.org avatar

I need to get a basic understanding of ( the framework ).

Is w3schools a wise choice to start with? https://www.w3schools.com/react/react_intro.asp

Or should I look elsewhere for my first taste?

I would like to avoid bad habits due to opinionated 3rd party documentation / tutorials.

thomasreggi, to programming

I'm bothered that https://www.webcomponents.org/publish uses NPM packages as the main way to publish a web component. I want a better web-component "package manager", something that's simple, uses module imports, can use Tailwind and TypeScript, and just plops out a URL like Deno packages do. It would support LIT and webc. I'd want a storybook-like UI and sample code.

aral, to programming
@aral@mastodon.ar.al avatar

If you’re using HTML Validate (you should; it’s ace), update to 7.15.2. It no longer flags multiple buttons with the same name used in forms as a validation error (this is a valid pattern that lets you interpret a form differently on the server based on which button it was submitted with).

https://gitlab.com/html-validate/html-validate/-/issues/212

#web #dev #html #validation #js #NodeJS #htmlValidate #validator

aral,
@aral@mastodon.ar.al avatar

PS. Kitten uses HTML Validate to show you validation issues with your pages as you develop.

:kitten:💕

https://codeberg.org/kitten/app

#SmallWeb #Kitten #web #dev #html #validation #js #NodeJS #htmlValidate #validator

francoisz, to programming
@francoisz@fosstodon.org avatar

10 years ago, I explained that you don't need JavaScript to provide a full-text search - CSS is enough. Although this technique was ground-breaking, almost nobody used it. I think it is time for you to revisit this article 😉 #CSS #JS http://www.redotheweb.com/2013/05/15/client-side-full-text-search-in-css.html

mlibby, to programming

I'm tired of seeing and described as "modern frameworks".

What's even remotely "modern" about them at this point? They're bloated dinosaurs that are one comet strike away from being next week's Active Server Pages.

I think I'd vastly prefer a post-modern framework. Like something that keeps me from writing any JS in the first place.

Blazor in .NET, Phoenix LiveView in Elixir, and Yew in Rust... those are actual modern web frameworks.

aral, to programming
@aral@mastodon.ar.al avatar

The Stripe API doesn’t include a way to validate publishable and secret API keys.

Here’s a simple function you can use to do that:
https://codeberg.org/aral/gists/src/branch/main/validateStripeKey.md

#Stripe #API #stripeAPI #JS #NodeJS #web #dev #gist

ramikrispin, to programming
@ramikrispin@mstdn.social avatar

(1/2) Shiny for Python :ablobcatenjoy:

Posit announced this week that the Shiny 🐍 version is moving out from alpha stage to general availability. The Shiny package is one of the great tools in R for building interactive and complex dashboards without or knowledge. It has a HUGE ecosystem, mainly due to community contribution, and it is great to see it expanding to the Python community.

https://shiny.rstudio.com/blog/shiny-python-general-availability.html

janriemer, to programming
colepeters, to programming
@colepeters@mastodon.online avatar

Today on the Begin blog: I take you behind the scenes, under the hood, and through the source code of the new @enhance_dev landing page.

This project was a ton of work, but it was also a ton of fun. I hope this encourages others to see what they can get up to with Enhance!

https://begin.com/blog/posts/2023-04-21-building-the-enhance-landing-page

brianleroux, to programming
brianleroux, to programming

so I built a little prototype while playing around with Node 20

this would allow any language to server side render web components by shelling out

(python, ruby, php, rust, c#, go, java, etc)

is that interesting to anyone here?

strypey, to web
@strypey@mastodon.nzoss.nz avatar

@alcinnz
I'm constantly raising an eyebrow at websites that don't even display basic text and images with JS turned off, or whose layout code is so JS-dependent the page turns into a hot mess without JS running. It's like a road you can't cycle or take public transport on, because the people who designed and built it expect you to be in a private motor vehicle. In both cases, it's hell for accessibility.

@ocdtrekkie @jalefkowit

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines