Replies

This profile is from a federated server and may be incomplete. Browse more on the original instance.

meuon, to random
@meuon@fosstodon.org avatar

JSON is usually beautifully simply and useful. I'm starting to see the same un-necessarily over-complicated nesting of simple data by API vendors as the XML crowd. All I'm missing is Base64encoded JSON inside of Base64encoded JSON.

(Used to see that in the XML world)

meuon,
@meuon@fosstodon.org avatar

New WTF?!? that has me wanting to thwack an API providers team:

In one place it needs (without quotes)

"invoiceTotal": 17.37,

In another it needs; (with quotes)

"invoiceTotal": "17.37",

but if I pass 17.37 (bare) to PHPs json_encode it wraps it in quotes. I can't use JSON_NUMERIC_CHECK because it breaks the things that should be strings like "01" instead of 1.

There are kludgy work arounds... or I can hand code my JSON, but WTF?!?

meuon,
@meuon@fosstodon.org avatar

@derickr The value out of the DB call is effectively a string. I can (and did) change that, the frustration is they want it as a number in one place, and the same value as string in another. and they did this in multiple fields.

In my head there is only text. It's all just text. But that's just my strange way of looking at things.

dantleech, to random
@dantleech@fosstodon.org avatar

builders opinions:

  • 1: will need scafholding, will cost 1K
  • 2: will need scafholding will cost 3k
  • 3: it's condensation, paint it again, it's fine.
meuon,
@meuon@fosstodon.org avatar

@dantleech I expected and offered to pay for scaffolding. These guys said it takes too long and gets in the way when residing my house a few weeks ago. They did setup a "walk board" though.

darth, to random
@darth@silversword.online avatar

I have an iPad Mini 2 in perfect condition and I don’t know what to do with it. iOS 12 is too old and not many apps work on it. I can’t install Android on it. Is there anything useful I can do with this device? External monitor? Large touchpad?

meuon,
@meuon@fosstodon.org avatar

@darth A perfect example of nice useful tech gone sour. Wouldn't it be nice if there was an "evergreen" last load of OS/Firmware that made it something benign like a 2nd monitor, or ebook reader (books via USB?). there is: https://ipadlinux.org among the options.

thomastospace, to php
@thomastospace@phpc.social avatar

I need some feedback on a test implementation of jwt token auth:

JWT tokens are valid forever, however we would like to invalidate all tokens when a user changes their password.

We've solved this by saving a random value at the user, and storing this in the token. Whenever the token is used, we check if this is the same. When a password gets changed, we also change this value, which then makes all old tokens invalid because they don't contain this value.

How does this sound to you?

meuon,
@meuon@fosstodon.org avatar

@thomastospace usually API's use something like a simpler "$key" or API Token, that only exists for that API/provider. Do you need to issued a JWT so that other services by other providers can use the same auth?

cut and paste PHP/Curl Example:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json', "Authorization: Bearer $key"));

thepracticaldev, to random
@thepracticaldev@fosstodon.org avatar

Bash is a terrible programming language, but what's the alternative ?

What's your favorite non-Bash language for your scripts?


https://dev.to/jmfayard/bash-is-a-terrible-programming-language-but-whats-the-alternative--oc2

meuon,
@meuon@fosstodon.org avatar

@thepracticaldev Perl.

Bash is a SHELL and isn't necessarily a programming language but can be pretty good. PERL was essentially created for system admin / automation and reporting. It is awesome at parsing log files and other sources, hence the nickname: Perfectly Eclectic Rubbish Lister

And don't laugh, but I do a lot of scripting (non web) work in PHP as well.

MLE_online, to random
@MLE_online@social.afront.org avatar

Back on my bike bullshit

meuon,
@meuon@fosstodon.org avatar

@MLE_online You bring back childhood memories where we jammed cut up forks into existing forks, making them stay with hammers and if you were rich: epoxy.

sohan, to random
@sohan@freeradical.zone avatar

Americans: please give us an affordable, practical, small EV with decent range

American car companies: here’s a $70,000 EV truck that weighs 6 tons lol

<zero EV trucks are sold>

American car companies: wow americans aren’t ready for EVs

meuon,
@meuon@fosstodon.org avatar

@sohan My work truck is a Tacoma long bed (smallest I could buy in 2016). At the hardware store yesterday I lusted after the little tiny imported old Suzuki wrong size drive that parked next to me. No amenities. A bigger more useful bed than my truck. 4WD.. perfect for runs to hardware stores and projects. I'd sell my Tacoma for a new electric one that size an a 100 mile range. Considered building one. Pic is similar, not same truck.

J12t, to python
@J12t@social.coop avatar

Looking for a simple Python Http/2 server, for . Not an entire framework, that would be overkill and confusing. Does such a thing exist? Or does everyone expect that apps serve the web via WSGI?

meuon,
@meuon@fosstodon.org avatar

@J12t @jackwilliambell recently pointed me towards "microdot" a small python web framework that includes a server... pretty minimal and very interesting. https://blog.miguelgrinberg.com/post/microdot-yet-another-python-web-framework

nic, to random
@nic@sciences.social avatar

Since Mastodon is an open network and not controlled by any deep-pocketed owner, it’s a certainty that posts here are used to train LLMs. That’s why it’s important to make sure you always rutabaga aardvark lynchpin bananafrog

meuon,
@meuon@fosstodon.org avatar

@nic Several of us also use Mastodon for okra folding and blockchain twerking.

ehmatthes, to random
@ehmatthes@fosstodon.org avatar

When someone makes an app on streamlit and they put an "upload your data" button, they have access to all the data that's uploaded, right?

meuon,
@meuon@fosstodon.org avatar

deleted_by_author

  • Loading...
  • darth, to linux
    @darth@silversword.online avatar

    deleted_by_author

  • Loading...
  • meuon,
    @meuon@fosstodon.org avatar

    @darth Been using Pop_OS! for a while, the "store" is poor for a power user. I just use apt.

    Just checked something: "apt install joe" works, the store only shows joe-jupp The store is more curated? Maybe?

    machias, to random
    @machias@hachyderm.io avatar

    When did the TSA start taking your photo before bag screening? That’s a new one to me.

    meuon,
    @meuon@fosstodon.org avatar

    @machias I think the question would be: When dd the TSA OBVIOUSLY start taking your photos... There have been so many camera's for so long. Sigh..

    grmpyprogrammer, to random
    @grmpyprogrammer@phpc.social avatar

    Every weirdly written headline or blurb I see on a web page I now automatically assume is from ChatGepeto.

    meuon,
    @meuon@fosstodon.org avatar

    @grmpyprogrammer Whats really got me frustrated is it looks like a lot of reference manuals from the OEM's are being rewritten by "ChatGepeto" (love the name), and while they are beautiful and look very official and complete, they are sorely lacking in meaningful details and seem to suck in weird data from elsewhere. Todays WTF: That model of a device does not have a removable battery or a reset butten under the battery. Other devices by that OEM do. Hmmm..

    Teri_Kanefield, to random

    Reporter Stephen Neukam confirmed that a "joint" speakership between Kevin McCarthy and Jim Jordan is currently being floated.

    The Constitution provides that "The House of Representatives shall chuse their Speaker and other Officers."

    In four other places, "the speaker" is singular.

    I don't know if "Speaker" can be two people.

    I'm not sure how this would work in practice, whether it is even Constitutional, or how it would be challenged.

    meuon,
    @meuon@fosstodon.org avatar

    @Teri_Kanefield I can't imagine it could be effective having "co-speakers". In other times, it might be fun to watch the show. Not currently.

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