Readit News logoReadit News
eikaramba commented on Show HN: Nia – MCP server that gives more docs and repos to coding agents   trynia.ai/... · Posted by u/jellyotsiro
stingraycharles · 5 months ago
Context7 injects a huge amount of tokens into your context, which leads to a very low signal/noise ratio. I’m using https://ref.tools myself, it delivers much more targeted docs.
eikaramba · 5 months ago
ref.tools did really bad on my tests. it hallucinated quite some wrong documentation.
eikaramba commented on Show HN: Nia – MCP server that gives more docs and repos to coding agents   trynia.ai/... · Posted by u/jellyotsiro
kissgyorgy · 5 months ago
[flagged]
eikaramba · 5 months ago
same here on firefox. the static content is not the problem all the animations and webgl stuff is making the website crash.
eikaramba commented on GarminDB   github.com/tcgoetz/Garmin... · Posted by u/haltcatchfire
parkersweb · a year ago
A friend recently put me on to Intervals (https://intervals.icu) for Garmin / Strava related data nerdery and I’ve enjoyed it very much. As a rower it was nice that you can construct reports that give rowing related metrics rather than just the usual cycle / run stuff.
eikaramba · a year ago
Nice app, i didn't know that one. I think for cycling that is quite sophisticated. However i had a different problem recently wanting to track a Hyrox Workout. I have a epix gen 2 (800€) and i cannot track it nicely. I know you can define workouts but it is such a hassle and doesn't even work good.

Long Story short, i just programmed my own App now for that. Works with all garmin watches and let's use define a fixed Workout and allows to analyze your individual performances across exercises:

https://multisports.creatness.studio - i'm still waiting for Garmin to approve my App Store Submission (another long story with garmin) but it can already be downloaded and sideloaded on a garmin watch. using it for a few weeks now myself.

eikaramba commented on YouTube embeds are heavy and it’s fixable   frontendmasters.com/blog/... · Posted by u/surprisetalk
schiffern · a year ago
Intentionally left as an exercise for the reader. ;-D If you do, share it back! I'll switch to your version.

Remember I threw this together in about half an hour, and maybe that amount of cleanup to post here. "Works for me" is the order of the day. The extra debugging alone would be longer than the whole project!

Besides, the function that runs is so light it doesn't really seem worth it. It could even make performance worse, since for reliability you need to observe mutations across the entire DOM, which could occur a lot more often. So for performance you want to add some debouncing too, adding yet more complexity to what's supposed to be a 'quick and dirty' fix.

eikaramba · a year ago
here it is. i am however showing the preview image and replacing it with the iframe on click. basically click2load. by using mutationobserver it seems i don't need ublock to block the iframe, because as soon as the browser tries to include it on the page it gets replaced anyway

(function() { 'use strict';

  const SITE = "https://www.youtube.com";
  const LINK_TO_TIMESTAMP = true;
  const SHOW_PREVIEW_IMAGE = true;

  const createPreviewElement = (videoId, newURL, frame) => {
    const container = document.createElement("div");
    container.setAttribute('data-yt-preview', 'true');
    container.style.position = "relative";
    container.style.width = frame.width + "px";
    container.style.height = frame.height + "px";
    container.style.cursor = "pointer";

    const img = document.createElement("img");
    img.src = `https://i.ytimg.com/vi/${videoId}/mqdefault.jpg`;
    img.alt = "Preview image of Youtube video";
    img.style.width = "100%";
    img.style.height = "100%";
    img.style.objectFit = "cover";

    const playButton = document.createElement("div");
    playButton.innerHTML = "▶";
    playButton.style.position = "absolute";
    playButton.style.top = "50%";
    playButton.style.left = "50%";
    playButton.style.transform = "translate(-50%, -50%)";
    playButton.style.fontSize = "48px";
    playButton.style.color = "white";
    playButton.style.backgroundColor = "rgba(0, 0, 0, 0.7)";
    playButton.style.borderRadius = "50%";
    playButton.style.width = "80px";
    playButton.style.height = "80px";
    playButton.style.display = "flex";
    playButton.style.justifyContent = "center";
    playButton.style.alignItems = "center";

    container.appendChild(img);
    container.appendChild(playButton);

    container.addEventListener("click", () => {
      const iframe = document.createElement("iframe");
      iframe.src = frame.src + (frame.src.includes('?') ? '&' : '?') + 'autoplay=1';
      iframe.width = frame.width;
      iframe.height = frame.height;
      iframe.frameBorder = "0";
      iframe.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture";
      iframe.allowFullscreen = true;
      iframe.setAttribute('data-yt-processed', 'true');
      container.parentNode.replaceChild(iframe, container);
    });

    return container;
  };

  const replaceEmbed = (frame) => {
    const frameURL = frame.src || frame.dataset?.src;
    if (!frameURL) return;
    const match = frameURL.match(/(^https?:)?\/\/(www\.)?youtube(-nocookie)?\.com\/embed\/([a-zA-Z0-9\-_]{11}).*?(\?.*((t|start)=([\dsmh]*)))?/i);
    if (match?.length == 9) {
      const videoId = match[4];
      const newURL = SITE + "/watch?" + ((LINK_TO_TIMESTAMP && match[8]) ? "t=" + match[8] + "&" : "") + "v=" + videoId;

      const previewElement = createPreviewElement(videoId, newURL, frame);
      frame.parentNode.replaceChild(previewElement, frame);

      // common lazyload hiding methods
      previewElement.style.display = "block !important";
      previewElement.style.opacity = "100% !important";
      previewElement.style.background = "transparent !important";
      const parent = previewElement.parentElement;
      if (parent) {
        parent.style.display = "block !important";
        parent.style.opacity = "100% !important";
        parent.style.background = "transparent !important";
      }
    }
  };

  const observeDOM = () => {
    const observer = new MutationObserver((mutations) => {
      mutations.forEach((mutation) => {
        if (mutation.type === 'childList') {
          mutation.addedNodes.forEach((node) => {
            if (node.nodeType === Node.ELEMENT_NODE) {
              if (node.tagName === 'IFRAME' && !node.hasAttribute('data-yt-processed')) {
                replaceEmbed(node);
              } else {
                node.querySelectorAll('iframe:not([data-yt-processed])').forEach(replaceEmbed);
              }
            }
          });
        }
      });
    });

    observer.observe(document.body, {
      childList: true,
      subtree: true
    });
  };

  // Initial replacement
  document.querySelectorAll('iframe:not([data-yt-processed])').forEach(replaceEmbed);

  // Start observing DOM changes
  observeDOM();
})();

eikaramba commented on PowerToys Run: extensible quick launcher for power users   learn.microsoft.com/en-us... · Posted by u/nateb2022
eikaramba · a year ago
Having tested all launchers which are available on earth I settled with fluentsearch. Most capable launcher of them all and also works with everything(although the internal indexer is also incredible powerful)
eikaramba commented on Shave and a Haircut   en.wikipedia.org/wiki/Sha... · Posted by u/bschne
eikaramba · 2 years ago
i have a little IOT device[0] which has a starting animation with LEDS when you reset it. i used that tune for the LED animation (without sound) just the timings. funny enough i never knew where it came from just that it was in my head and always associated with looney tunes. Finally i know its origin :)

[0] https://notific.at

eikaramba commented on uBlock Origin 1.53   github.com/gorhill/uBlock... · Posted by u/archo
lodovic · 2 years ago
you can block the detection popup itself with uBlock. Seems to have done the trick for me.
eikaramba · 2 years ago
No don't do that. And stop spreading misinformation. There is a thread on Reddit explaining why this is absolutely stupid and will only result in you losing access to YouTube. Or do you really think YouTubes for works like this.

The biggest problem currently are people spreading those types of misinformation see https://www.reddit.com/r/uBlockOrigin/comments/17j6ygs/youtu...

eikaramba commented on Patent for attention-based sequence transduction neural networks (2019)   patents.google.com/patent... · Posted by u/ukuina
j-pb · 3 years ago
ffs, that patent never should have made it in the european patent office.

It's obviously math.

This whole "computer implemented invention" workaround is a complete sham.

To think that the EU wastes billions annually on this broken institution, while completely failing to properly fund startups is simply infuriating.

eikaramba · 3 years ago
EU? what are you talking about? The patent is registered in USA. the only country missing from the list as far as i see is actually the EU. Or did you mean USA instead of EU?
eikaramba commented on Heroku has been running a second copy of my scheduler instance   openfolder.sh/heroku-anti... · Posted by u/haki
eikaramba · 3 years ago
https://caprover.com FTW - just host everything yourself. you can host multiple services without any problem on a 5$ VPS nowadays, especially if you using just a simple SSR webapp, some lightweight backend and sqlite db. as soon as your hardware is not keeping up with your demand, you make enough money to scale vertically.
eikaramba commented on Compostable fast-food packaging can emit volatile PFAS   cen.acs.org/environment/p... · Posted by u/john-titor
ChancyChance · 3 years ago
wait what? what article are you reading? DR Tungs site says "All our floss is free of PTFE and PFAS (polyfluoroalkyl substances)."

u/eikaramba

KarmaCake day64July 16, 2016View Original