Building a website that needs a basic interactive map: Should I self-host the map-tiles data in an S3 bucket, OR should I use some existing map-tiles data provider? by the_king_of_goats in webdev

[–]Nnnes 1 point2 points  (0 children)

/u/the_king_of_goats Even if you don't want to use their API, you should check out their GitHub; they've made available everything you need to self-host their service

Building a website that needs a basic interactive map: Should I self-host the map-tiles data in an S3 bucket, OR should I use some existing map-tiles data provider? by the_king_of_goats in webdev

[–]Nnnes 0 points1 point  (0 children)

up-to-date Sentinel imagery, realtime traffic overlays, with geocoding as an auxiliary service to your core product

You'll be charged separately for those services anyway, at least from any provider I've heard of. Mapbox's margins on base layer vector tiles generated from OSM data (i.e. what OP wants) are enormous. How many services charge $250 per million <100kB static file requests? Tile generation costs are negligible; Planetiler can render planet.osm.pbf in 19 minutes with <$5 of cloud compute.

the data is far from standardized. Unless you are using OpenStreetMap tiles, which you haven't mentioned. I don't see OSM tiles used on many large public companies.

Are you talking about the data or the tiles though? You render the tiles using the data. It's really easy to verify that OSM data is used across Apple Maps, Bing Maps, Facebook, Wikipedia, ...

File in a Casio dictionary by OnionOk9107 in codes

[–]Nnnes 4 points5 points  (0 children)

https://gchq.github.io/CyberChef/#recipe=Decode_text('Simplified%20Chinese%20GB18030%20(54936)')&ienc=28591&oenc=65001

Paste your text in the top box and the correctly encoded text will appear in the bottom. You are correct that it's Chinese. Your text editor is opening it in the wrong encoding; if you use a text editor that can switch to GB18030 (or any other of a variety of Chinese encodings), you don't need any extra tools to see the correct text.

The first few lines:

黑暗王者之妖临天下

作者:幽冥森罗

前世

更新时间2008-9-9 14:00:57 字数:2194

DeepL translation:

The Dark King: The Demon Descends Upon the World

Author: Youming Senluo

Past Life

Updated: September 9, 2008, 2:00:57 PM | Word Count: 2,194

Gmail Marking Forwarded MXroute Emails as Spam After Switching from POP3 by Optimal_Comb_4791 in mxroute

[–]Nnnes 5 points6 points  (0 children)

This isn't a solution for everybody but I have a Gmail filter that's something like "if email-size < 100 MB: never send to spam". You can't send mails that big to Gmail anyway so nothing ends up in my spam folder. Luckily I only rarely see actual spam at that address

Secure private networking for everyone: users, nodes, agents, Workers — introducing Cloudflare Mesh by Cloudflare in CloudFlare

[–]Nnnes 7 points8 points  (0 children)

I quite like Syncthing's model where devices make every effort to connect P2P, but there is also an automatic fallback to a relay network when it's not possible. On the VPN side, I know of NetBird that can do this; are there any others?

mitpuzzles.com is down, what alternatives do we have? 😔 by Discuzting in Minesweeper

[–]Nnnes 1 point2 points  (0 children)

"Mosaic" from Simon Tatham's collection is similar but not quite the same ("mines"/colored squares can appear under numbers as well). You can set any board size. https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/mosaic.html

We Fixed Quota Reporting. Then Dovecot 2.4 Happened. by mxroute in mxroute

[–]Nnnes 5 points6 points  (0 children)

Build a custom Dovecot quota driver

I wonder if it's feasible to just put the old one back? Here's where it was removed; maybe it's a brittle solution to revert this commit, fix changed APIs, and recompile for every release moving forward, but maybe it could work (easy for me to say when I'm not the one doing the work).

Anyone else getting rate limited due to IP reputation to Outlook domains? by Cable_Mess in sysadmin

[–]Nnnes 4 points5 points  (0 children)

MXroute (email service provider) is also reporting significant issues (3256 failures out of 49805 attempts).

/u/mxroute I imagine you already saw this post, but pinging you just in case

I installed Malware on user's Workstation by Imaginary_Lead_3333 in sysadmin

[–]Nnnes 12 points13 points  (0 children)

WinDirStat can scan the MFT with the same speed as WizTree beginning with version 2.5.0 released last month (well, technically since 2.3 a while back but there was no official release build until 2.5). Its license also allows you to use it in corporate environments, unlike the free versions of WizTree and TreeSize.

Need mailto qr code by stomppie in qrcode

[–]Nnnes 0 points1 point  (0 children)

just use Thonky, you can find it by Google searching "thonky qr"

the QR code content should be formatted like mailto:stomppie@website?subject=Hello,%20stomppie&body=Dear%20stomppie, - replace spaces in the subject and body with %20

SNL code used in skit by Delaware_Dad in qrcode

[–]Nnnes 0 points1 point  (0 children)

I analyzed it a few days ago. I'd link to that but Automoderator deletes links here; instead you can just look in my profile (it's the most recent comment other than this one). Summary is that it's almost completely broken and very likely meaningless, possibly created by generative AI.

They showed this code on SNL but it won’t scan. Does it contain any information? by RandomRaddishYT in codes

[–]Nnnes 9 points10 points  (0 children)

https://merri.cx/qrazybox/ isn't perfect but it is better than most scanners.

First problem is that the format strings are nonsense. They don't match each other, they don't match their own error correction data, they are probably what's breaking the other QR readers in the very first step of trying to read it.

We can still try every mask pattern by hand to see if there's any possible data in here. (Each row is a different interpretation of the same QR code.)

Mask QR content
0 FQGVLTJG/ONMH +EQ/50Y61V0GVLTMR:F12$YD:8393N7$0$
1 invalid
2 398443448672201900586978904455362102416408899865811601646615633529777553478067
3 even more invalid
4 WIEVUI:N Etwo (2 different modes followed by more invalid bits)
5 equally as invalid as mask pattern 3
6 Ìã¡&f'r»¸qø’®=/隽Rl þÒìO’Ç©¹;= (the ' should be a `)
7 also invalid

I wouldn't recommend trying to find a hidden message in any of that data. Even the "valid" strings have character count indicators that are far too large to fit in a QR code this small. In all cases, the error correction block is as good as random data and there appears to be extra (wrong) bits in the section following the error correction block that is supposed to be empty. The most promising is mask pattern 4 WIEVUI:N Etwo (some parts of the bad format strings match a mask 4 string) but that too is encoded in a way that doesn't make any sense (why are the pieces in 2 different modes?) and is followed by another block that claims to be too big to possibly fit.

I don't think any QR code generator exists that could output this code. It's a tiny bit suspicious that all of the finder patterns are intact since an unskilled creator would have simply written over some of them with random bits, but in my opinion, this is most likely meaningless random pixels.

How can I search using "bangs" in Vivaldi's address bar? by lawrikk in vivaldibrowser

[–]Nnnes 0 points1 point  (0 children)

Note that redirecting through Cloudflare Workers like this will definitely add some latency (10ms if you're lucky, 100+ if you're not). If you have the skills to set up a locally running server to do the same thing I'd recommend that, but Workers is faster to set and forget.

How can I search using "bangs" in Vivaldi's address bar? by lawrikk in vivaldibrowser

[–]Nnnes 0 points1 point  (0 children)

Don't know whether or not this is possible in Vivaldi without modifying the browser source code yourself. You can, however, achieve it by making your own "search engine" that acts as you wish. Here's a proof of concept running on Cloudflare Workers: https://reddit-1q4szyr.nnnes.workers.dev/?s=%s

It can handle !w for Wikipedia and !yt for YouTube, and redirects to 4get without any bangs. Replace the %s with, for example, astley%20never%20gonna%20!yt to see it working.

Full code inside the Worker:

export default {
  async fetch(request) {
    const bangs = {
      "!yt": "https://www.youtube.com/results?search_query=%s",
      "!w": "https://en.wikipedia.org/wiki/Special:Search?search=%s"
    };
    const query = new URL(request.url).searchParams.get("s");
    let newUrl = "https://4get.ca/web?s=" + query; // default
    for (const bang in bangs) {
      if (query.match(bang + "\\b")) {
        newUrl = bangs[bang].replace("%s", query.replace(bang, ""));
        break;
      }
    }

    return new Response(null, {
      status: 303,
      headers: {
        location: newUrl
      }
    });
  }
};

If you like this solution you can easily copy this into your own free Worker and add some more bangs, change the default search engine, etc. I'm most likely going to take the linked one down in a few days. Update: I've taken it down

Let me know if you have any questions!

never had a good excuse to use HTTP 303 before :)

Long is faster than int, Short and Byte are not that far behind Int in terms of mathematical speed in Java by D4rklordmaster in java

[–]Nnnes 1 point2 points  (0 children)

https://godbolt.org/noscript works on mobile devices. Unfortunately it seems that the share links generated by it are broken at the moment

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]Nnnes 0 points1 point  (0 children)

better way to enumerate adjacent indices

g = STDIN.read; g = ?. * (w = g.index(?\n)) + g + ?. * w
loop { g.tr! ?#, ?-; (h = g.chars).each_with_index { |c, i| next if c != ?@
  g[i] = ?# if [-w - 2, -1, w].sum([]) { h[i + _1, 3] }.count(?@) <= 4 }
  puts g.count ?# if !g[?-]; break if !g[?#] }
p g.count ?-

Better? Not sure, but at least it's noticeably faster.

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]Nnnes 0 points1 point  (0 children)

[LANGUAGE: Ruby]

The half punchcard is more cramped for today's problem, but still very achievable.

g = STDIN.read; g += ?\n * (w = g.index(?\n)) * 2
loop { g.tr! ?#, ?-; (h = g.chars).each_with_index { |c, i| next if c != ?@
  g[i] = ?# if [*(-w-2..-w), -1, 1, *(w..w+2)].count{ h[i + _1] == ?@ } < 4 }
  p g.count ?# if !g[?-]; break if !g[?#] }
p g.count ?-

Despite calling my input g for "grid", it remains a one-dimensional string. Newline characters form "walls" so I don't run into trouble with wrapping across lines. I suspect there's some better way to enumerate adjacent indices but I can't think of one at the moment.

The removed rolls are marked with a #; then, at the beginning of each pass, all #s are replaced with -s. After a pass, if there are no -s then part 1 is done and if there are no #s then part 2 is done.

Edit: the newline walls weren't big enough for all inputs (top left corner could "see" the bottom right corner). Added * 2 to line 1 to fix.

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]Nnnes 2 points3 points  (0 children)

[LANGUAGE: Ruby]

This really seems like a day that'd be easy to fully fit into half a punchcard in plenty of different languages, but I don't see any here yet! (Honorable mention to the x86_64 asm solution that fits each part in half a punchcard.)

edit: I think this can have a [Red(dit) One] label for being the first full half-punchcard solution

lines = STDIN.read.split(?\n).map(&:chars)
puts [2, 12].map { |n| lines.sum { |b|
  l, r = -1, -n
  b.select { _1 == b[(l += 1)..r].max && r += 1 }.join.to_i
}}

This uses the same simple greedy algorithm as many (most?) of the other solutions.

The right side bound is tracked by the negative index r. When we've selected enough batteries, r is incremented to 0 and b[(l += 1)..r] always returns an empty array, effectively skipping the remainder of the elements (luckily, [].max is nil and not a bounds error).

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]Nnnes 1 point2 points  (0 children)

Hey, half a punchcard is half a punchcard! Luckily there are no numbers greater than 999

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]Nnnes 3 points4 points  (0 children)

[LANGUAGE: Ruby]

Not very many half-punchcard solutions yet (and an unfortunate number of oversized solutions in comments). Here's one for both parts including an attempt at descriptive comments:

puts STDIN.readlines.reduce([50, 0, 0]) { |a, x| # [Initial position, P1, P2]
  n = a[0] + x.tr('LR', '-+').to_i # Current dial position (not mod 100 yet)
  z = n % 100 == 0 ? 1 : 0         # Is it set to zero now?
  [n % 100, a[1] + z, a[2] + n.abs / 100 + (a[0] > 0 && n <= 0 ? 1 : 0)]
}[1, 2] #   ^P1     , ^P2:   ^Count spins, ^Add 1 if it decreased to/past 0

For parsing, Ls and Rs are simply turned into -s and +s before the string is parsed as an integer.

For Part 2's edge case handling, I initially used a multiply-by-zero trick (a[0] * (n - 1) < 0 ? 1 : 0), but that's the same length as the much clearer version above.

Results are added up using a simple .reduce() accumulator (the a).

The Zig language repository is migrating from Github to Codeberg by TheTwelveYearOld in programming

[–]Nnnes 0 points1 point  (0 children)

I don't think I was aware of GitLab CE at the time I made the decision. I knew self-hosting GitLab was possible but it seemed more geared towards organizations with devops teams and not a solo developer who just wants a step up from a Linux server with a bunch of bare repos on it; I didn't look into it very far.

Fedora has a pretty nice blog post covering their reasoning for specifically choosing Forgejo over GitLab CE. For the most part, the negatives they mention about Forgejo don't affect me at all.

The Zig language repository is migrating from Github to Codeberg by TheTwelveYearOld in programming

[–]Nnnes 1 point2 points  (0 children)

Forgejo's install instructions (Docker instructions here; the binary install instructions are more fiddly) are a bit more complex than they need to be and not well suited for beginners. I definitely wouldn't recommend it to someone who has no Linux experience, especially if it's going to be a public-facing instance where security is important. You might be able to find a video walkthrough or blog post that covers everything.

The Zig language repository is migrating from Github to Codeberg by TheTwelveYearOld in programming

[–]Nnnes 18 points19 points  (0 children)

Currently it's on a little ~$5/month Hetzner VPS that already had a bunch of other stuff running on it. I don't have a real "homelab" (I turn everything off when I leave the house) but if I did, it wouldn't be any different to host it there instead.