HNHacker News
TopNewBestAskShowJobs

Linux-Fan

176 karma · joined May 15, 2022

https://masysma.net/31/web_main.xhtml
submissionscomments
Linux-Fan··on Cool Retro Terminal
It is also in Debian:

https://packages.debian.org/search?keywords=cool-retro-term

I have it installed here and rarely use it (daily driver is urxvt), but it occasionally pops up when a GUI program wants to launch a terminal and by whatever configuration mechanism they use these days prefers cool-retro-term in favor of the urxvt :)

Linux-Fan··on No CSS Club
My current solution is to switch the syntax highlighting to monochrome which should work fine for both modes. I love the colorful syntax highlighting, though. So maybe I will revisit this later to find out if I can do something along the lines of what you suggest.
Linux-Fan··on No CSS Club
Thank you for bringing this up. I had been looking for an “easy” way to enable a Dark Mode on my website without overriding user-configured default colors and this seems to do it pretty well.

My page uses a minimalistic CSS and only changes the colors for syntax highlighting -- which is now slightly broken in the dark mode but probably still an improvement over the white background for those people who want the dark mode :)

Linux-Fan··on Zeal is an offline documentation browser for software developers
For many queries, Google offers more of a "ready-made" solution e.g. from a StackOverflow post or blog.

When looking at the offline documentation, I know that I am looking at a supported version (not something ancient or much newer than what is deployed in production) and that I am looking at the "authorative" answer i.e. the "real" docs not some third party comments.

When the program I am developing is expected to run correctly even in the presence of errors, it makes a lot of sense to me to consult the authorative documentation rather than "the web" which rarely covers all of the possible corner cases.

Linux-Fan··on Zeal is an offline documentation browser for software developers
For me, the best documentation is often the manpages and perldocs, both of which can be navigated using VIM keybindings.

For the remainder of documentation, I found HTML to be the “best” format and thus view them from the Web Browser even when using offline copies. To make them accessible, I use my browsers home page - a reduced version is shown here: https://masysma.net/32/ial.xhtml - and in the most recent version it supports some rudimentary movements like hjkl...

Linux-Fan··on Neverssl Uses SSL
The developer tools Network tab directly indicates the first connection as being HTTPS. No redirect shown there.

I additionally tested with my own site: http://masysma.net/31/web_main.xhtml. It is configured to not redirect to HTTPS except for the root node (http://masysma.net). It is not configured to behave any differently for user agents and hence the redirection (or no redirection) behaviour can also be checked by the commandline tools that print the course of the redirection (like curl, wget).

Linux-Fan··on Neverssl Uses SSL
Firefox 102.10.0esr seems to do this here.

I type into the address bar: `http://example.com` and it corrects it to the HTTPS version. Even when I try to change the URL back to the `http://` it goes to the HTTPS version. When I try the same with curl as in `curl -v http://example.com` I can see the HTTP traffic coming through correctly i.e. the site still supports HTTP.

Note that I have configured "Don't enable HTTPS-Only Mode" in the Firefox settings. I use some addons although none to specifically redirect my requests to HTTPS...

Linux-Fan··on Pure Sh Bible
> I suppose the fancy business with printf is flexing, but I suspect the majority of people scanning documents like this would prefer to have examples with echo "${variable%%string_modifier}"

POSIX itself contains some interesting notes about `echo` and `printf`, e.g. from the `printf` page:

"The printf utility was added to provide functionality that has historically been provided by echo. However, due to irreconcilable differences in the various versions of echo extant, the version has few special features, leaving those to this new printf utility, which is based on one in the Ninth Edition system."

The behaviour of `echo` is especially inconsistent for escape sequences. Often, `echo -e` is used to enable escape sequences for it but this is not POSIX compliant.

For any "standards-perferring" shell scripting pages I'd thus think `printf` is the right way to present it if only to advertise that this builtin exists.

> should likely be done with external tools just because people understand "oh, awk or sed -- I know this!" instead of "what the hell is this line noise?"

I am not actually sure about this "I know this" part. I think many users of AWK only ever use it to do some sort of "access the n-th column of input" as in `echo a b c | awk '{ print $2 }'`. Similar for `sed` which is often only known and used for "replace string a by string b in input" use cases.

> If you're writing performance optimized shell, well, probably put the keyboard down

There is some difference between performance optimized and "hugely inefficient" that can make the difference between a task taking minutes vs. a few seconds. It may not seem much but shell scripts are often integrated into automated processes (think of build environments or system startup tasks) and there, seconds quickly accumulate. Whether this is relevant to your use case, only you can know.

I found this "Pure Sh Bible" to be highly interesting, but there are some places where it has some rough edges and it may not show the "best practices" for standard use cases. Still a very useful resource.

Linux-Fan··on Wayback: Self-hosted archiving service integrated with Internet Archive
AFAIK it does not contain any function to support this directly.

My primary way to interact with Archive Box for such purposes is by calling it on the command line. Scripts may be used to obtain the URLs of interest from any source.

When I started with Archive Box I had some existing downloaded Websites from ScrapBook and Save Page WE already. I used some hacky scripts to extract the URLs from the respective pages and overwrite Archive Box' downloaded copies by my original copies as to make it work for pages that had been deleted in the meantime. All my data sources were local/desktop though.

Linux-Fan··on Wayback: Self-hosted archiving service integrated with Internet Archive
I am not angelmm, but another happy ArchiveBox user.

My choice of extractors is the following: Singlefile, PDF, Screenshot, archive.org.

I found the largest issue with any website archiving tools to be the discrepancy between what I see in my Web Browser and what is saved. The most "reliable" way that still works today for me seems to be the "Save Page WE" Firefox plugin.

I have a sidecar container running that checks for HTML files appearing in a directory, triggers the archivebox save and then overwrites the "singlefile" capture by the provided HTML file. This way, I can trigger archiving by just using the Save Page WE plugin and storing the resulting HTML file in the directory.

Linux-Fan··on Universal Install Script (2016)
The script has single `&` which means the respective commands will run in background (and in parallel!) which effectively ignores their return codes.
Linux-Fan··on How likely is losing a Google account?
> I'd be interested, even if it was just a rough guide.

Here we go: https://masysma.net/37/google_how_to_create_an_account_witho...

You might notice the date on that page being 2021/04/06 -- I had this in draft state for a long time, but newly put it online now. What has worked back then may not work anymore, though.

> My experience has been that some services apparently let you sign up without a phone number, but then try to extort it out of you either at first login (or worse) after you've used the service for awhile.

Yes, that is basically what Google did to me, too. It was not a new account either -- from 2012 (I still have the initial "registration" e-mail).

I just checked: I can still login into that account that I had created around 2021 when I discovered the "trick" as described on the website. It asked for username/password/2FA and that was it. I did not use it much in the meantime, though.

Linux-Fan··on Ask HN: Why does every package+module system become a Rube Goldberg machine?
I actually wrote something of that sorts for my personal projects:

https://masysma.net/11/maartifact.xhtml

Downloads tgz if not already downloaded, saves it to directory `../x-artifacts` and optionally extracts it.

Linux-Fan··on How likely is losing a Google account?
Actually, in my experience it can also bite the other way around:

I was locked out of my Google account after using it in Italy and coming back to Germany. Unable to login: It would first ask username, password, then send me an a-mail, then ask for the code from the e-mail (which I provided) and then either tell me to enter a phone number (Google is not going to get it from me!) or alternatively:

“You're trying to sign in on a device Google doesn't recognize, and we don't have enough information to verify that it's you. For your protection, you can't sign in here right now.”

If that isn't dystopian.

I interpreted the phone number requirement as a signal that “had I setup 2FA, it would not have asked for the phone number but maybe just the second factor?”. Then I went on an odyssey to setup a Google account without linking it to a phone and with 2FA enabled (also not linked to a phone!). Seems OK so far, but the procedure is highly complicated and partially luck-dependent. I am probably going to publish it, because there are tons of articles about how to setup Google account without phone number, but none of them worked for me at the time :)

I still do not rely on Google for anything but the search engine which still works without any login...

Linux-Fan··on Ask HN: What colorscheme are you using in your code editor?
For my needs, contrast must be strong. Hence I mostly stick to the defaults on a 16-color urxvt.

vim: `ron` which I think is the default.

vifm: custom-made colorscheme (https://github.com/m7a/lp-conf-cli/blob/master/vifmrc if you're interested, screenshot: https://masysma.net/32/conf-cli_att/scrvifmtheme.png)

Occasionally, I turn off syntax highlighting altogether (most often this happens in Markdown or HTML documents where the default syntax highlighting does stupid things like trying to set the font to italic...)

Linux-Fan··on Let's Try Gnome Boxes
You could also put it the other way around: Modern computing increasingly relies on virtualization and it is disappointing to see that GUI tools increasingly require GPU acceleration making them inaccessible inside virtualized environments.
Linux-Fan··on Ask HN: Can I see your scripts?
My most-used self-written script is probably ``syssheet` -- this script displays information about the running system in terms of load (RAM usage, disk usage, load avg, users) and Hardware (CPU model, Network Interfaces...). It is like a crossover between top and inxi. I use it to clearly distinguish what kind of system I am logging into and deploy it to all of my systems: https://masysma.lima-city.de/11/syssheet.xhtml

There is also a collection of more "obscure" scripts in my shellscripts repository documented here: https://masysma.lima-city.de/32/shellscripts.xhtml.

Another (probably niché) topic is my handling of scanned documents which arrive as PDFs from the scanner and that I want to number according to the stamped number on the document and convert to png at reduced color space: https://masysma.lima-city.de/32/scanning.xhtml

Linux-Fan··on Vifm: A Vim-like file manager
I like using vi-style keybindings for various applications.

Hence, for file managing, I had been using `vifm` for a long time and then discovered `ranger`. I switched to it due to its advanced preview capabilities and the default interface being closer to my taste.

However, said preview function (and also other functions) sometimes crashed and I recall some strange behaviour of copy operations in ranger when symlinks were involved (?). In any case, I switched back to vifm for stability reasons and have been effectively using it for years.

What I had been missing from the console file managers was a "copy & paste between windows" option. With vifm, I implemented it as a patch getting nice assistance from vifm's developer xaizek. This resulted in the (back-then) new feature `syncregs` which I have kept using ever since. Not sure if ranger came to offer something similar in the meantime :)

YMMV

Linux-Fan··on Hard Things in Computer Science
As another problem of applied CS I also suggest to add "Character Encoding" to the list of strongly underestimated complex problems :)
← PreviousPage 3 of 3