Back
Daniel Reina

Daniel Reina

@dgrcode

Working on different projects with the goals of generating passive income and being happy
67
Joined September 2020

Raycast is a must have. I use item and vscode daily as well.

Another one I haven't seen mentioned here is Monitor Control, to adjust brightness of external monitors with fn keys.

And if I can plug my own shameless promotion, Recadio, one of my projects. It prevents the default auto switch to a Bluetooth mic, which usually leads to crap sound quality. Read more at www.recadio.com

Here's the first iteration www.dgrcode.com/wip-streak-ra…

It's a prototype where I've added a few sliders to tweak a few things to see what looks better.

Let me know your thoughts. And I can continue iterating or build a final version.

Nice! Thanks a lot. That was very fast.

So far GraphiQL has complained if I didn't provide an API key, so I have it set on the headers.

I've been playing around with the endpoint and it's working great. Next step is to build the visualization 💪

After playing around with GraphiQL for a bit, it looks like I can only get the streak for a given userID. I can get a bunch of users by accessing the Projects or Todos, and getting the users from them, but I'm guessing that is far from ideal 😅

How hard would it be to expose the Users? That way I could do all the sorting/filtering in Node. Is not like I'd be able to add thousands of users in a visualization, so the top100 would work as well :)

You can now get the top 100 users with the API. Please use a valid API key as I'll probably make it required for this end point.

{
  users(orderBy: {streak: desc}) {
    username
    streak
    best_streak
    url
  }
}

Nice! Thanks a lot. That was very fast.

So far GraphiQL has complained if I didn't provide an API key, so I have it set on the headers.

I've been playing around with the endpoint and it's working great. Next step is to build the visualization 💪

I'll look into the API and see what I can find. Worst case I could scrap wip.co/streaks as @lvca suggested!

I'll see if I can find some time to have fun with this visualization!

FWIW, wip.co/streaks being available as a separate page is actually a bug 😅

The homepage streak leaderboard is loaded through an iframe-like method where it fetches that URL. But that URL isn't supposed to be access directly so it might not continue to work.

You might also run into Cloudflare's anti-bot measures when trying to scrape. So the API is really the best way. If you end building this, I might be able to add some filter/sorting feature to the API so you can fetch the top 100 streaking users.

After playing around with GraphiQL for a bit, it looks like I can only get the streak for a given userID. I can get a bunch of users by accessing the Projects or Todos, and getting the users from them, but I'm guessing that is far from ideal 😅

How hard would it be to expose the Users? That way I could do all the sorting/filtering in Node. Is not like I'd be able to add thousands of users in a visualization, so the top100 would work as well :)

You can now get the top 100 users with the API. Please use a valid API key as I'll probably make it required for this end point.

{
  users(orderBy: {streak: desc}) {
    username
    streak
    best_streak
    url
  }
}

Nice! Thanks a lot. That was very fast.

So far GraphiQL has complained if I didn't provide an API key, so I have it set on the headers.

I've been playing around with the endpoint and it's working great. Next step is to build the visualization 💪