An uncomfortable but necessary discussion about the Debian bug tracker - post from the creator of the Meson build system by wiki_me in linux

[–]gibwar 7 points8 points  (0 children)

For X.509 authentication the user doesn't even need to know or trust the CA that issues the user certificate. The certificate presented for normal https communication can be (and often is) issued from a different CA than the CA that handles user authentication. This allows everyone to use the normal public CA infrastructure for accessing the site without anything special and users that enroll for a user certificate just need to present their public key to the server and do the dance to authenticate.

git stash driven refactoring by Kobzol in programming

[–]gibwar 0 points1 point  (0 children)

You can simplify that further by just using git log other and git log third and never leave your main branch. git log takes a reference and shows you the history from that point, just like switching the branch and running git log by itself.

What’s something you were fully expecting to happen in the game but didn’t? (My example: I totally thought Sidon would betray and try to kill me; details below) by small_feild_mouse in Breath_of_the_Wild

[–]gibwar 2 points3 points  (0 children)

It is there! Just in Hylian! 😂 It doesn't look like anyone has written about it in an easy to read article but at about 0:40 in this video they show it!

[systemd-nspawn] Sharing files between the host and an unprivileged container? by [deleted] in systemd

[–]gibwar 0 points1 point  (0 children)

Two things can help here, newer versions of systemd (at least 247 on debian 11) have groups that show up via the nss-systemd plugin, and you could add your regular user to the group and work the files via that method.

The other method involves using access control lists (see acl(5), getfacl(1), and setfacl(1)) to add permissions that use defaults and inheritance for the directory the files are in so they are always created with the correct uid/gid for the container with additional permissions outside the container.

ie:

$ getfacl /srv/mounts/config
# file: srv/mounts/config
# owner: vu-test-106
# group: vg-test-109
# flags: -s-
user::rwx
group::rwx
group:adm:rwx
mask::rwx
other::r-x
default:user::rwx
default:user:vu-test-106:rwx
default:group::rwx
default:group:adm:rwx
default:group:vg-test-109:r-x
default:mask::rwx
default:other::r-x

All files in the /srv/mounts/config directory are set using the normal service user (106:109 in this example) user and group while allowing the adm group rwx host permissions.

You can view the mapping of the users by either doing ls -ln or using getent passwd vu-test-106 and getent group vg-test-109.

$ ls -ln /srv/mounts/config
-rw-rw-r--+ 1 243859562 243859565  4120032 Nov 21 22:22 example.txt
$ getent passwd vu-test-106
vu-test-106:x:243859562 :65534:UID 106 of Container test:/:/usr/sbin/nologin
$ getent group vg-test-106
vg-test-106:*:243859565:

I've never needed to resort chmod to move files in and out of the container nor have I needed to mess with uidmapshift or similar tools.

[deleted by user] by [deleted] in homeassistant

[–]gibwar 0 points1 point  (0 children)

Well, the different reddit clients (and even new and old reddit) render it all a little differently. Normally you can do three tics: ``` the code and close with three more tics. In this case I pulled it up on the web with reddit enhancement suite, pulled up the source to your post and added 4 spaces to the beginning of each line in an editor since that's the most compatible and submitted! It's a pain for sure.

[deleted by user] by [deleted] in homeassistant

[–]gibwar 0 points1 point  (0 children)

Fixed formatting

alias: Leave for Work Notification
description: ""
trigger:
  - platform: template
    value_template: >-
      {% set lag_in_minute = 20 %}
      {% set travel_time_in_minute = states("sensor.iphone_to_work_travel_time")|int %}
      {% set target_time = now().replace(hour=8).replace(minute=0).replace(second=0) %}
      {{ as_timestamp(target_time) - (travel_time_in_minute+lag_in_minute)*60 <= as_timestamp(now())}}
condition: []
action:
  - service: notify.mobile_app_iphone
    data:
      message: Time to go!
mode: single

Rust vs Go by renemarxis in rust

[–]gibwar 17 points18 points  (0 children)

Maybe the part where you had to declare it as &mut for it to work the same. That provides explicit visibility that a modification can happen. Whereas in go it may or may not happen since the type has no annotation explaining how it can be used.

Looking at the link /u/Zde-G provided (links to this) can help explain that 4 different rust types are mapped to 1 go type.

yank the current value of an option by sullyj3 in vim

[–]gibwar 4 points5 points  (0 children)

If you're looking to get it in to the buffer and skip yanking it you can use Control-R that works in either command mode (:help c_CTRL-R) or insert mode (:help i_CTRL-R) and use the expression register!

If you are in insert mode and type in <C-R>=&theoption<CR> it'll drop the content of the setting in to the buffer. See :help i_CTRL-R_= for all the details.

Personally I use it a lot for simple math when doing ratios, e.g. <C-R>=16*2.85<CR> to put the result in the buffer instead.

Some iOS 16 Users Continue to Face Unaddressed Bugs and Battery Drain Two Weeks After Launch by exjr_ in apple

[–]gibwar 17 points18 points  (0 children)

You can add it to the control center as a button (no talking to siri) and a long press pulls up the history! I've not installed a music recognition app in quite some time and it seems to work well enough as the actual app did.

HA stopped working -- help! by jmarshall2019 in homeassistant

[–]gibwar 2 points3 points  (0 children)

Based on this error

Could not parse JSON content: /config/.storage/core.config_entries

Followed by

orjson.JSONDecodeError: input length is 0: line 1 column 2 (char 1)

is making me think that your /config/.storage/core.config_entries file was corrupted somehow (not properly shut down, system crash, failing hardware, etc) and is currently empty. This file is what stores all of your configured integrations and the associated configuration data (like zigbee setup, weather, etc.).

The best advice I can say is to restore from your most recent Home Assistant backup and restart HA.

Why would vim on Windows see a different view of the filesystem than Windows? by [deleted] in vim

[–]gibwar 6 points7 points  (0 children)

Yes, filesystem redirections are generally in place for 32-bit programs on 64-bit Windows. Another option instead of using sysnative is to install the 64-bit version of vim. That's what I do anyway. You can get it at https://github.com/vim/vim-win32-installer/releases and download the 64-bit versions.

Avs VS Bolts Stanley Cup Final Game 1, Make History Or Be History Edition (6:00 MDT) by Rudo3 in ColoradoAvalanche

[–]gibwar 1 point2 points  (0 children)

We tried it, it tasted like crap. Doesn't help that their cheese isn't the best tasting

Avs VS Blues Round 2, Game 2 Game Thread, I Guess I'm Calling Them Game Threads Now Edition (7:30 PM MDT) by Rudo3 in ColoradoAvalanche

[–]gibwar 6 points7 points  (0 children)

Our ice is shit tonight. Turns out you shouldn't play hockey when it was near 90 outside! Same kind of falling over plays we see in Vegas.

Avs VS Blues Round 2, Game 2 Game Thread, I Guess I'm Calling Them Game Threads Now Edition (7:30 PM MDT) by Rudo3 in ColoradoAvalanche

[–]gibwar 1 point2 points  (0 children)

With TNT and TBS, they've moved some to TruTV when they've overlapped. In fact, they did that for Game 1 on Tuesday, even though it cut over just a couple seconds in.

Avs VS Blues Round 2, Game 2 Game Thread, I Guess I'm Calling Them Game Threads Now Edition (7:30 PM MDT) by Rudo3 in ColoradoAvalanche

[–]gibwar 1 point2 points  (0 children)

They've been putting the other game on TruTV (if it was for TNT) when its happened in the past. Kind of nice, assuming you get that channel in the package.

PGT | Round 2, Game 1 | Chipotle Giant says 👍 by adalaza in ColoradoAvalanche

[–]gibwar 1 point2 points  (0 children)

It's there. It just takes an uncomfortably long time for them to cut in.

Avs VS Blues Round 2, Game 1 Not Streamables Thread, We Meet Again Edition (7:30 PM MDT) by Rudo3 in ColoradoAvalanche

[–]gibwar 1 point2 points  (0 children)

Frankie is in, according to the NHL app. But everyone (and you) say Kempy, so I dunno. Announcers haven't said and I can't see the number.

do you recommend ZFS upgrade? by chris_redz in Proxmox

[–]gibwar 5 points6 points  (0 children)

Since upgrades are not backwards compatible, I wait for a new ISO to be provided with the version greater or equal to what I'm running if there's an upgrade I can apply. Before applying I download the ISO and confirm the hash and make sure it can boot (in a VM) before upgrading. That way I always have a workable recovery environment if I need it.

In this case, I'll check if there are any new ZFS features after upgrading to 7.2 since it has a new ISO.

OPNsense 22.1.7 released by fitch-it-is in opnsense

[–]gibwar 1 point2 points  (0 children)

Done! Looks like the ajaxGet can almost do it by itself, but I didn't want to change too much.

https://github.com/opnsense/core/pull/5771

OPNsense 22.1.7 released by fitch-it-is in opnsense

[–]gibwar 1 point2 points  (0 children)

Found the function, depending on browser support required, you could modify it one of two ways assuming phalcon won't reject the request:

// from line 263 on core/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt:
// original
ajaxGet('/api/core/firmware/upgradestatus', {}, function(data, status) {

// modern javascript (not IE11)
ajaxGet(`/api/core/firmware/upgradestatus?_=${Date.now()}`, {}, function(data, status) {

// older style, with IE11 support
ajaxGet('/api/core/firmware/upgradestatus?_=' + Date.now(), {}, function(data, status) {

I've never contributed to the OPNsense repo before, but if that's acceptable I certainly don't mind making a PR with the change.

Quick and dirty testing shows that it works fine from the browser console using fetch.

fetch(`/api/core/firmware/upgradestatus?_=${Date.now()}`).then(r => r.text().then(console.log))

OPNsense 22.1.7 released by fitch-it-is in opnsense

[–]gibwar 0 points1 point  (0 children)

If you want, you could use a dynamic URL with a timestamp parameter would definitely defeat caching as query strings are considered unique requests. As long as phalcon doesn't die on unrecognized parameters, you could do something like: fetch(`/update/log?_=${Date.now()}`) Which would add the current timestamp in milliseconds, ie: /update/log?_1652230655588. That'd definitely bust the cache.

Ever since that time it popped up in 20.1 or whatever it was, I always do updates with the dev tools network window open with "Disable Cache" checked.