Debian has (or had; at least my Devuan still has) a simple shell script as first init. Was an interesting read and helped me understand were to add my remote rootfs decryption.
https://salsa.debian.org/kernel-team/initramfs-tools/-/blob/...
251 karma · joined May 2, 2021
Debian has (or had; at least my Devuan still has) a simple shell script as first init. Was an interesting read and helped me understand were to add my remote rootfs decryption.
https://salsa.debian.org/kernel-team/initramfs-tools/-/blob/...
> I’ve seen pages that are still top 3 for a particular competitive query years later, simply because they were one of the first to write about it.
Reason why I still always get the Java 8 docs for any search. Annoying.
Also the reason why Zsh has an additional =(command) construct which uses temporary files instead.
Reading the first sentence on that page was to much?
"Init Freedom is about restoring a sane approach to PID1 that respects portability, diversity and freedom of choice."
systemd fails on the portability criteria.
Apart from that, why should they invest there limited time to include systemd? Devuan is Debian without systemd. If you want systemd install Debian.
Well, I remember one incident were a 'professional' data center burned down including the backups.
https://en.wikipedia.org/wiki/OVHcloud#Incidents
I know no such incident for some basement hosting.
Doesn't mean much. I'm just a bit surprised so many people are worried because of the server location and no one had mentioned yet the quite outstanding OVH incident.
I still don't know but found instead an interesting reddit post were users found and analyzed this "waste of space" three month ago.
https://www.reddit.com/r/Helldivers/comments/1mw3qcx/why_the...
PS: just found it. According to this Steam discussion it does not download the duplicate data and back then it only blew up to ~70 GB.
https://steamcommunity.com/app/553850/discussions/0/43725019...
https://prosody.im/doc/setting_up_bosh
https://prosody.im/doc/modules/mod_websocket
But I never tried it myself and from a quick search the popular non-browser XMPP apps/clients don't seem to use it.
Some widgets, or rather the repeated reinventions of widgets in HTML+CSS, use variables and the next equally looking widget has none, or other variables with the same values.
From an outsider perspective it looks like a mess.
* or almost the same with minimal, likely unintended, differences like one button has a slight border when hovered but another button right next to it has none
It is changeable. With enough dedication you can go a long way just with CSS.
In this case it is even rather easy because the "unified toolbar" the thing containing the search box, the menu bar (if shown) and the tab bar are three elements in the same flex box. They can be reordered by setting the order property.
Only downside in this case is that (if client side decoration is not disabled in the settings) the window buttons (close, minimize) are also part of the unified toolbar and would end (without further fixes) below the tab bar.
As a quick (and dirty) experiment I moved the tab bar left to the search bar in the same row just with:
#titlebar {
flex-direction: row;
> unified-toolbar { order: 2; width: 50vw; }
#tabs-toolbar { order: 1; width: 50vw; }
}
And a hacky way which often works good enough is to reposition and hardcode stuff with position:absolute/fixed/sticky.Finally Thunderbird's own customization dialog can be used to fill the empty space around the search bar. By default it has a spacer left and right but that is easy to change even without custom CSS.
> it is also not possible to theme the settings areas.
I don't see a reason why this should not work. If by settings area the author means the settings page which in modern Thunderbird is more or less a web page in the content area, it should be stylable with userContent.css instead of userChrome.css.
The hard part is to find the right @-moz-document selectors for each individual content page.
Also, by the way, when JavaScript addons get involved: userChrome.css is applied quite unfortunate in the css cascade. It gets low priority that is why they are usually full of !important rules. With JavaScript it is possible to add custom css instead as so called author stylesheet which makes it easier to override default styles. (never tried it myself)
https://old.reddit.com/r/FirefoxCSS/comments/msoqte/how_can_...
With some limitations it is possible to restyle Shadow DOM elements. It is just a lot harder to select the right element if it is inside a shadow dom.
I found a workaround (don't remember where I found it) which I use extensively in my personal userChrome.css.
The basic concept (afair) is that you can write selectors which match inside the shadow dom as long as they do not need to "cross" the shadow dom "boundary".
A good starting point for me is often to select by tag and part attribute, e.g. image[part="icon"] { ... }
Now the trick to style a particular instance of a web component (shadow dom instance) is to use variables and defaults.
With a selector which targets the "root element" of the shadow dom I set variables for any value I want to change and with a selector which is fully inside the shadow dom I add styles using the variable (which is then only defined for that particular instance) or a default which effectively cancels my custom style anywhere else.
As concrete example the dialog to create new calendar events has a drop down box to select the calendar where each entry is prefixed with a dot with calendar color. The menulist has a shadow dom and the menupopup another. I styled those dots as squares (for fun and because I think the modern web is to round). So to set the variables on the "outside" I have:
menulist#item-calendar {
--parthack-boxmarker-radius: 0;
--parthack-boxmarker-image-size: 1em;
--parthack-boxmarker-border: inset 0 0 0 1px color-mix(in srgb, black 20%, transparent);
}
and to apply it menuitem.menuitem-iconic > hbox.menu-iconic-left > image.menu-iconic-icon {
border-radius: var(--parthack-boxmarker-radius) !important;
width: var(--parthack-boxmarker-image-size, revert-layer) !important;
height: var(--parthack-boxmarker-image-size, revert-layer) !important;
box-shadow: var(--parthack-boxmarker-border, none);
}
(the variable prefix "parthack" has no special meaning; it just evolved because I initially used it to hack styles onto shadow dom elements over the part attribute)Now this will change only the icons only in the menulist with id 'item-calendar' and leave others unchanged. Whether I use revert-layer as default or something else depends on what style the element has by default and try and error.
ping 1.1
is short and easy to remember. Since I'm not using Cloudflare DNS, ping is actually the service I require :DOne reason why I personally prefer to use Bashisms like ${x//str/replace} or [[ $value =~ $pattern ]] instead of doing the common x=$(echo $x | sed s/str/replace/) which has to launch two processes just for the sake of avoiding Bashism. (or grep -oP ... which is nice but a BASH_REMATCH is often simpler)
Also while true color gifs seem to be possible it is usually limited to 256 colors per image.
For those reasons alone APNG is much better than GIF.
If I remember correctly, instead of overwhelming the developer with the full report, CI only presented a hand full of randomly chosen failed mutation tests. The developer then could decide to ignore the result (mutation testing will usually produce some false positives) or extend the tests to kill the mutation.
I used PiTest recently the first time and found it quite useful. As you said, a pretty awesome idea. But definitely not a tool for people who always strive for 100% test coverage.
[1] https://blog.pitest.org/dont-let-your-code-dry/
[2] https://homes.cs.washington.edu/~rjust/publ/mutation_testing...
Btw I found most of the jmh samples interesting. IMO a quite effective mix of example and documentation. (and I'm not sure there is even much other official documentation)
[1] https://github.com/openjdk/jmh/blob/master/jmh-samples/src/m... [2] https://github.com/openjdk/jmh/blob/872b7203c294d90c17766d19...
for(int i=0;i<10000; ++i){
// do nothing just compute hash again and again.
hash = str.hashCode();
}
https://github.com/MayankPratap/Samchika/blob/ebf45acad1963d..."do nothing" is correct, "again and again" not so much. Java caches the hash code for Strings and since the JIT knows that (at least in recent version[1]) it might even remove this loop entirely.
To give some examples what I mean:
- Apache can be a FastCGI server (mod_fcgid) and proxy (mod_proxy_fcgi) - Nginx (and most other Webservers I checked) is only a FastCGI proxy
Wikipedia [1] lists both as "Web servers that implement FastCGI". For me it took some time to recognize the difference whether a server speaks the FastCGI protocol or can also host/spawn FastCgi supporting applications which do not daemonize by themself.
For the (probably) most used FastCGI application PHP this is easy because php-fpm is both a FastCGI server and application.
An example for a (Fast)CGI application which is not also a server is MapServer [2] which is listed by Wikipedia as CGI program and by its own documentation with "FastCGI support" or "FastCGI-enabled".
The fact that it is only a FastCGI application and needs an additional FastCGI server to host it is (in my opinion) not clearly communicated.
A common tutorial to combine MapServer with Nginx is to use fcgiwrap or spawn-fcgi as FastCGI server.
Since a FastCGI application can usually also act as CGI application it is easy to miss that the first option is running the application as CGI and only the second as FastCGI where one instance serves more than one request.
For me the main difference is that a FastCGI server will open a socket and can spawn worker processes (which php-fpm does and MapServer does not) and a FastCGI application (the worker process) will accept and handle connections/requests.
A FastCGI proxy translates requests (usually from HTTP to FastCGI protocol) and redirects them to a FastCGI server. It does not spawn processes like Apaches mod_fcgid does.
Due to the simplicity it should be even possible to use systemd as simple FastCGI server. [3] (I have never tried it)
My recommendation if you ever come across an FastCGI application which cannot open a socket / daemonize by itself use Apache mod_fcgid. Even if you already use another Webserver to handle HTTP. From all options I checked it has by far the most useful options to dynamically limit the number of worker processes and respawn them from time to time.
[1] https://en.wikipedia.org/wiki/FastCGI [2] https://en.wikipedia.org/wiki/MapServer [3] https://nileshgr.com/2016/07/09/systemd-fastcgi-multiple-pro...
<a target-new-window=true target-top-frame=true target-self=true ...
Now the browser needs to define and document some kind of priority to solve those situations.
If you can have only one target anyway why not simply give special targets special values.Assuming the reference date is correct and unknown birth date is stored as timestamp 0. Since we are before 2025-05-20 at the moment the reported age has to be 149 years, not 150. What I'm missing? Would be very unusual to round up age.
In short, in at least one variation, the attacker is able to smuggle in a known (unauthenticated) session token into the victims browser. Once the victim logs in the session token is authenticated and known to the attacker.
The easy countermeasure is to renew the session token on login and not reuse a previously unauthenticated session token. Or your application has no session at all before login.
Another reason why Java isn't the greatest language to create CLI tools with.
What's next on the list? Maybe priority/severity or status/resolution?
I helped on a quite large open source project for some time and loved working with Bugzilla. The announced switch to Github for that project was one reason I lost interest. I even prefer to work with a well administrated(!) Jira over Github issues.
In POSIX shells '~name' expands to the home directory of user 'name'
$ echo ~bin
/bin
Now your tool need a way to query home directory for any user including system users. Depending on NSS configuration this is more complicated than just reading /etc/passwd.All for the rare case that someone passes a file path starting with tilde and wants it to be expanded. IMO, when you provide a file interactively you do so through a shell and tilde expansion is handled by the shell and otherwise just provide the actual file path and do not rely on the tool doing additional expansions.
PS: I mixed up TUI and CLI program a bit in my head. For an interactively used TUI program it might be beneficial to implement tilde expansion (but then it should be as complete as in Shells). A CLI program should not do magic stuff like tilde expansion.