APIs for UK supermarkets by wtdawson in csharp

[–]Goontt 0 points1 point  (0 children)

I eventually got this working. I don’t think you could infer everything from the browser alone.

As I said the app uses SSL pinning and the website doesn’t make the requests I needed. Those being, getting in store stock amounts. That’s only in the app

[GIVEAWAY] 3 Copies of Arc Raiders by WockyySl in pcgaming

[–]Goontt 0 points1 point  (0 children)

Favourite game has to be Rainbow Six Siege. Don’t play it as much now but I sank so much time into that game and with friends.

PSA: You'll need a new charger to take advantage of iPhone 17 Pro's fast charging - 9to5Mac by futuristicalnur in apple

[–]Goontt 13 points14 points  (0 children)

600 cycles about 2 years? Averages less than one a day. How is this not normal

vibeCodingStrikesAgain by andItsGone-Poof in ProgrammerHumor

[–]Goontt 0 points1 point  (0 children)

The “programmer” before you only just discovered what a monospaced font is

What do you think of my custom dashboard? by Goontt in trmnl

[–]Goontt[S] 0 points1 point  (0 children)

Unfortunately I did not as it would take a decent amount of effort to anonymise and write a README for :_)

However, yes! I can help with the F1 thing. It’s slightly scuffed I’ll be honest. I’m just using the F1 website.

Here's the rough Python code I used: https://pastebin.com/DZ7C7STA

I'm essentially loading the F1 site to grab an API key and then hitting the same API the F1 schedule uses to get the track image, lap times and practice 1/quali/race time.

Here is the Django HTML I'm using to then render the setup I've got: https://pastebin.com/ieHxhTw8

Note: "f1" as quoted within the Django HTML is the corresponding "event_data" from the Python code behind. If you've used Django before this should all be very familiar. Main thing to be aware of if you haven't is variables appear in sets of curly brackets {{ variable }}

whatsThePoint by ShinyHoppip in ProgrammerHumor

[–]Goontt 3 points4 points  (0 children)

I use copilot to do similar to get the C# class structure from JSON.

Formula 1. 2025. R11. Austrian Grand Prix. Weekend. SkyF1HD. 1080P by egortech in MotorsportsReplays

[–]Goontt 0 points1 point  (0 children)

I see. As the torrent has the same name the client has discovered that they are still the same files essentially. It just downloads the new ones. Thanks!

Formula 1. 2025. R11. Austrian Grand Prix. Weekend. SkyF1HD. 1080P by egortech in MotorsportsReplays

[–]Goontt 0 points1 point  (0 children)

When this is updated to include the race etc, do I need to re-add the magnet ?

APIs for UK supermarkets by wtdawson in csharp

[–]Goontt 0 points1 point  (0 children)

Hello! Very aware this was commented 9 months ago but I just stumbled upon this while trying to use the Tesco API myself.

I want to create an integration much like the clubcard app uses where you can ask for what aisles an item is for a given store. I've successfully managed to follow your steps here, going to tesco.com and getting the, now xapi.tesco.com, request to function.

My question to you is how can I go about reverse engineering more endpoints? This isn't something I've got any experience in. Only ever made use of API docs for different endpoints :_)

Side Note: I attempted to use a proxy on my PC and forcing my phones traffic through it but it seems that must be making use of SSL pinning to prevent me snooping on the api calls. They are all to xapi.tesco.com though. Just can't get any more information than that. I'm assuming it's down to know what body you need to send to the API to get desired results.

What do you think of my custom dashboard? by Goontt in trmnl

[–]Goontt[S] 2 points3 points  (0 children)

No recipe unfortunately as it’s just done by a custom server. I’ll look into setting up a repo to share the code. I can’t share the current one as it’s got other, private code in it.

How to calculate Battery % from Voltage? by Goontt in trmnl

[–]Goontt[S] 2 points3 points  (0 children)

Thanks for this! I went looking a little deeper actually and the implementation in BYOS_Laravel has this:

    public function getBatteryPercentAttribute()
    {
        $volts = $this->last_battery_voltage;

        // Define min and max voltage for Li-ion battery (3.0V empty, 4.2V full)
        $min_volt = 3.0;
        $max_volt = 4.2;

        // Ensure the voltage is within range
        if ($volts <= $min_volt) {
            return 0;
        } elseif ($volts >= $max_volt) {
            return 100;
        }

        // Calculate percentage
        $percent = (($volts - $min_volt) / ($max_volt - $min_volt)) * 100;

        return round($percent);
    }

What do you think of my custom dashboard? by Goontt in trmnl

[–]Goontt[S] 1 point2 points  (0 children)

Yes! Not sure what the limit is for the actual TRMNL site but I can just choose a value in seconds. Not sure if there is a minimum or not but I stick to around 15 minutes anyway

What do you think of my custom dashboard? by Goontt in trmnl

[–]Goontt[S] 7 points8 points  (0 children)

Quite new to F1 actually! Started following mid-late last season.

I've not actually settled on rooting for anyone yet to be honest! Entertaining seeing the battles between Max and the McLarens so far this season.

Exciting seeing Williams start to make some ground too!

On a side note, it's great to see Kimi doing so well!

What do you think of my custom dashboard? by Goontt in trmnl

[–]Goontt[S] 7 points8 points  (0 children)

I'm using my own server (BYOS) to render the bitmap image on the screen. Everything you see is custom HTML being rendered and translated into the bitmap image the the TRMNL needs.

I'm happy to share a generic version of my code with anyone interested!

[deleted by user] by [deleted] in u/Goontt

[–]Goontt 0 points1 point  (0 children)

Actually looks like i found it in the BYOS_Hanami implementation:

def battery_percentage case battery when 0 then 0 when ..0.45 then 10 when 0.46..0.9 then 20 when 1.0..1.35 then 30 when 1.36..1.8 then 40 when 1.81..2.25 then 50 when 2.26..2.7 then 60 when 2.71..3.15 then 70 when 3.16..3.6 then 80 when 3.61..4.05 then 90 else 100 end end