Better HN
topnewbestaskshowjobs
Log inSign up

eikaramba

69 karma · joined Jul 16, 2016 (10y ago) · 28 submissions

Submissions

comment 10mo ago · link · parent

see my reply above for a fix

comment 10mo ago · link · parent

let me make your day. this will fix the problem 100% -> https://old.reddit.com/r/oneplus/comments/1p3pcnt/guide_fix_...

I couldn't believe it myself but by basically force closing the settings menu the drawer animation will be gone until you reboot :)

comment 1y ago · link · parent

ref.tools did really bad on my tests. it hallucinated quite some wrong documentation.

comment 1y ago · link · parent

same here on firefox. the static content is not the problem all the animations and webgl stuff is making the website crash.

comment 1y ago · link · parent

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.

comment 2y ago · link · parent

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();
})();

comment 2y ago · link · parent

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)

comment 2y ago · link · parent

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

comment 3y ago · link · parent

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...

comment 3y ago · link · parent

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?

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

the actual source https://www.mamavation.com/beauty/toxic-pfas-dental-floss-to...

comment 3y ago · link · parent

okay now it actually sounds way more interesting. Because NextDNS is by far my most beloved DNS resolver

comment 3y ago · link · parent

I made an App to help find out food intolerances. Basically make it super easy to enter what you have eaten. Not even based on individual items, just basic foods like soy, tomatoes, onions... help me figure out that it was garlic which was causing all the trouble.

https://app.foodolyst.creatness.studio [Web]

https://play.google.com/store/apps/details?id=studio.creatne... [Android]

Currently trying to release it on IOS, but Apple is very strict with these types of apps.

comment 3y ago · link · parent

former listary user here: pro tip, switch to fluent search. it is even more powerful. and for directory switching i found "direct folders".

comment 4y ago · link · parent

i actually build a device which is using both TTN and Helium exactly for that reason. https://notific.at/en

comment 4y ago · link · parent

I have to also mention https://directus.io/ here. Coming from Strapi, Feathers.js and Supabase i have to admit it is the closest competitor to Supabase i know. There are things Supabase is doing better but the Admin Interface and the Customization Capabilities of Directus are just unmatched.

comment 4y ago · link · parent

there is svelte-native based on Nativescript. it is similar fast or faster[1] and provides the ability to directly use every native function in JS without having to rely on new interfaces or build versions (e.g. you can directly access new APIs from JS). beeing able to use Svelte makes it sooo much easier to develop mobile apps.

[1] https://blog.nativescript.org/perf-metrics-universal-javascr...

comment 4y ago · link · parent

I recently also developed an App to help me figure out my IBS and digestion problems. Basically i looked at all the apps in the app store but did not found a simple to use app. Inserting your meals should really be as simple as it possibly can, otherwise you will end up not using it at all.

If anyone is interested, it is currently available in the google app store. Apple coming soon. Foodolyst: https://play.google.com/store/apps/details?id=studio.creatne...

Also available as a webapp: https://app.foodolyst.creatness.studio

The app works in German&English. I haven't proof read every English entry however, so feedback is very much welcomed. I can return lifetime premium access in return :)

Okay enough advertising, sorry but the topic is quite interesting and everyone with food problems can just benefit from this.

comment 4y ago · link · parent

Current stats as of 30.08.22 14:22 are (1,166,650 votes):

41% OPTION 1: No changes. Telegram may continue to share IP addresses and phone numbers of terror suspects only based on a court decision

21% OPTION 2: Upon request by German police authorities, Telegram may disclose IP addresses and phone numbers of suspects of serious crimes, even if not supported by a court decision.

34% OPTION 3: Under no circumstances may Telegram share user information, including IP addresses and phone numbers of terror suspects.

4% No opinion / I am not from Germany

comment 4y ago · link · parent

Supabase and Directus are my go-to BaaS offerings. In terms of developing server side code(custom backend logic) Directus is still better than supabase. Also the Admin Interface is more capable. However in terms of performance supabase is of course way better. Lucky that we have such good options nowadays.

comment 4y ago · link · parent

yes i thought about that. Interestingly there are a lot of customers who are buying gateways and extend the coverage in their neighbourhood. It takes around 5 minutes to set one up.

There are gateways who are more complicated and more for developers, but of course i don't want to offer these.

comment 4y ago · link · parent

the problem is that battery consumption. of course there are alterantives, but all of them need WAY more power than LORA

comment 4y ago · link · parent

thank you for that kind words, means a lot. i am not selling a lot and the whole development process was part of the journey for me. i also think that one should just try to build stuff, even if it is only helping a small amount of people.

comment 4y ago · link · parent

I am currently building a end consumer device using LORAWAN. It sends you a push notification upon receiving mail in your mailbox. It also uses helium, because the network coverage is quite good. https://notific.at - i think end user use cases are the key to make the business model behind Helium work. The fact that helium was able to scale within 1 year what TTN had to do in 8 years is quite the proof for me that paying gateway owners some kind of revenue is the way to scale the network coverage.

comment 4y ago · link · parent

IMHO these are the 3 open source backend/platform -as-a-service solutions you need to have a eye one:

1) Directus (in my view the best offering of features)

2) Supabase (if you want more performance. the admin ui however can only be used for internal access)

3) Appwrite (works good and has its own advantages. however in my case i would rather go with 1&2)

-Strapi is out since v4 (too many really big showstopers. i was a fanboy since v3 but directus just brings more to the table and is way mature)

-feathers.js (more lightweight, but unfortunately lost its momentum. better alternatives are nowadays available)

comment 4y ago · link · parent

I find Directus better because it is 100% even with Role Support. Not related to directus just enjoing it so much AFTER i have used strapi and supabase for quite some time. Don't get me wrong supabase is great and i know this tool is a generic admin interface, but the same is true for directus. you can put directus on top of any DB (sqlite, postgresql, mysl, oracle) and get a fancy admin ui for free. https://directus.io/

comment 10y ago · link · parent

co-founder of fileee.com here(we do that for a living :) ). I can tell you that in general adaptivethreshold is better, because it is less error prone against low contrast situations and missing edges. That said there are also cases where canny performs better. That's why we actually decided to use a machine learning approach to decide when to use what. There are even more things one can do to improve the detection(e.g. hough tranform to find edges or use variance or fft to assest whether possible "document" candidates are just garbage rectangles or real documents.)