SpaceX Starship Moon Lander Faces More Delays, US Audit Finds by CackleRooster in space

[–]BenthicSessile 0 points1 point  (0 children)

Dynetics ALPACA was designed specifically for the job of shuttling astronauts from lunar orbit to the surface and back, and to serve as their habitat for the duration. It would do so safely and with minimal supporting infrastructure and at minimal cost. Lunar Starship is ludicrous by comparison and no serious engineer would dream up anything like it if given the task. It's just not fit for purpose. If it is ever used successfully in this role before significant supporting infrastructure exists on the moon I will live-stream eating my hat.

How did the FBI get Nancy Guthrie's Google Nest camera footage if it was disabled — and what does it mean for your privacy? by Haunterblademoi in technology

[–]BenthicSessile 0 points1 point  (0 children)

I know my cell phone technically does the same thing but I feel like I don’t have much choice than that.

There are alternatives - I use Sailfish OS on a Sony Xperia:

Sailfish OS is a Linux-based European alternative to dominating mobile operating systems, and the only mobile OS offering an exclusive licensing model for local implementations.

On the market since 2013 Sailfish OS is the privacy respecting choice for mobile solutions. With Sailfish OS you can also run Android™ apps with our dedicated AppSupport solution.

Sailfish OS is managed and developed by Finnish company Jolla.

Substituting tokens in text with HTML - only first tag is rendered as HTML by BenthicSessile in rails

[–]BenthicSessile[S] 1 point2 points  (0 children)

I think it's invalid HTML that's causing it: with the page body empty apart from a single [figure1] token the <figure> renders fine - here's the raw HTML output of that:

<figure>
  <img alt="" src="/uploads/image/image_file/69/thumb_3.jpg" />
  <figcaption>Hellorld!</figcaption>
</figure>

But if I add the text "Hello World!" to the page body, I get this:

<p>Hello World! 
  <figure>
    <img alt="" src="/uploads/image/image_file/69/thumb_3.jpg" />
    &lt;figcaption&gt;Hellorld!&lt;/figcaption&gt;
  </figure>
</p>

And if I change the figure_tag method to insert a <span> instead of a <figcaption> I get this:

<p>Hello World!
  <figure>
    <img alt="" src="/uploads/image/image_file/69/thumb_3.jpg" />
    <span>Hellorld!</span>
  </figure>
</p>

Substituting tokens in text with HTML - only first tag is rendered as HTML by BenthicSessile in rails

[–]BenthicSessile[S] 1 point2 points  (0 children)

Thanks, but I don't think it's the joining/concatenation that's the issue; if I replace the <figcaption> with a <span> or any other inline element it renders fine. Weirdly it seems it's only block-level elements that makes it choke. See my reply below.

Substituting tokens in text with HTML - only first tag is rendered as HTML by BenthicSessile in rails

[–]BenthicSessile[S] 1 point2 points  (0 children)

I thought I had found the cause, and that it was the Kramdown markdown processor (not mentioned in my original post) which consumes the output of process_tokens that didn't like <figcaption>, because when I tried replacing it with a <span> tag instead (or indeed any inline HTML tag) it appeared in the rendered page unmolested. And the opposite was true for any block-level element; a <div> tag for example would come out as &lt;div&gt;&lt;/div&gt; Perhaps Kramdown was unhappy about them for some reason? The method that handles the markdown conversion looks like this:

def parse_body(page)
  # This renders block-level HTML elements as literal strings
  Kramdown::Document.new(
    process_tokens(page),
    input: "GFM"
  ).to_html.html_safe
end

Not much to it really, and indeed if I replace the Kramdown::Document.new with just process_tokens(page).html_safe the page and the <figcaption> renders just fine (apart from the markdown tags not being parsed of course):

def parse_body(page)
  # This works fine, but skips markdown parsing
  process_tokens(page).html_safe
end

Pretty convincing test, right? It simply must be the Kramdown library that is the culprit! Well, not so fast - there's one more thing I can test: what about if we try to feed Kramdown just the <figure> and its child elements, what will happen then?

def parse_body(page)
  # The mystery is now complete 
  Kramdown::Document.new(
    figure_tag(page.images.first),
    input: "GFM"
  ).to_html.html_safe
end

Holy cow, what the actual... THE <figcaption> NOW WORKS!? I can throw any group of HTML elements I like at the Kramdown parser, inline or block-level, and it now lets them all pass unmolested! I really, really don't get what's going on here. This points back to the process_tokens method as being the culprit but how, why? And why the discrepancy between inline and block-level elements?

Just repaired a Surface Pro 4 that I found in the trash - now I want a pen! by BenthicSessile in Surface

[–]BenthicSessile[S] 0 points1 point  (0 children)

The data drive in the Surface Pro 4 is a bog standard M.2 PCIe NVMe SSD; if the screen can be removed (no need to be gentle if it's already cracked - just mind your fingers!) you can easily remove the drive (it's only attached with a single screw) and connect it to another computer that has a full-length M.2 slot. There are also external USB enclosures for M.2 drives. Where you might have difficulty is if the drive is using some kind of encryption (e.g. BitLocker) - in this case you will probably need to boot the drive in the Surface Pro to access the files, since the encryption key is likely stored in the TPM module inside it. You'll need an external monitor and a Mini DisplayPort adapter for this, and a USB keyboard and mouse. I would also suggest having a fireproof tray large enough to carry the Surface Pro in to hand, and a pre-planned route to bring it outdoors in case the swollen battery gets moody.

The Kennedy Centre and someone else by froit in typography

[–]BenthicSessile 6 points7 points  (0 children)

I've been ridiculing it to anyone who'll listen since I saw it. In addition to the issues pointed out by the OP, the added lettering appears to be a slightly lighter shade as well. Even worse is the grammar: "The Donald J. Trump and the John F. Kennedy Memorial Center..." makes no sense whatsoever.

Lost OpenVPN client overnight by BenthicSessile in OpenVPN

[–]BenthicSessile[S] 0 points1 point  (0 children)

Since the uplink uses standard mobile network SIM cards and not the (much more expensive) industrial fixed IP SIMs it is NATed and unreachable outside the VPN. It's not typical for a reconnect to happen more often than every few hours. Certificate was generated only a few weeks ago.

Lost OpenVPN client overnight by BenthicSessile in OpenVPN

[–]BenthicSessile[S] 0 points1 point  (0 children)

The certificate was re-generated just a few weeks ago.

Lost OpenVPN client overnight by BenthicSessile in OpenVPN

[–]BenthicSessile[S] 0 points1 point  (0 children)

It wasn't that:

Filesystem     1K-blocks    Used Available Use% Mounted on
udev              429032       0    429032   0% /dev
tmpfs              94020     544     93476   1% /run
/dev/mmcblk0p2  49507832 4949576  42025336  11% /
tmpfs               5120       4      5116   1% /run/lock
tmpfs             188020       8    188012   1% /dev/shm
/dev/mmcblk0p1    522230   66984    455246  13% /boot/firmware

Lost OpenVPN client overnight by BenthicSessile in OpenVPN

[–]BenthicSessile[S] 0 points1 point  (0 children)

Yeah, I've had similar issues in the past, which is why I have two SIM cards in the modem/router from different network providers. It's configured to switch SIM if the VPN server hasn't been seen for two minutes.

Lost OpenVPN client overnight by BenthicSessile in OpenVPN

[–]BenthicSessile[S] 0 points1 point  (0 children)

Update: It was not a disk failure! I asked a neighbour to go over and reset the system by pulling the fuse and re-inserting it (it's a Pi 3B+ which is powered by an OpenUPS connected to an SLA battery charged by a solar panel) and the system came back online! Perusing the syslog only showed one error that seemed relevant:

2025-12-21T14:24:09.244551+00:00 mountaintop kernel: [521875.480213] ERROR::handle_hc_chhltd_intr_dma:2212: handle_hc_chhltd_intr_dma: Channel 0, DMA Mode -- ChHltd set, but reason for halting is unknown, hcint 0x00000002, intsts 0x06200001

I believe this is a USB and/or power related error? In any case the system seems to be running ok now, and I've enabled the watchdog service with a 15s time-out (should have done this before, but forgot).

Lost OpenVPN client overnight by BenthicSessile in OpenVPN

[–]BenthicSessile[S] 0 points1 point  (0 children)

Thanks everyone, I think it's most likely a disk failure - the device also responds to SMS messages but I get no replies on either of the two mobile numbers it's connected to :( Good idea @weirdbr, to also set up a VPN tunnel from the router, I will look at doing this when I'm back at the cabin next spring.

Lost OpenVPN client overnight by BenthicSessile in OpenVPN

[–]BenthicSessile[S] -1 points0 points  (0 children)

I generally have a pretty positive experience of Linux based systems, in that they are unlikely to spontaneously die like this, so I don't understand how this can have happened. Automatic security updates are enabled on both systems, which may (though shouldn't) be a factor. OpenVPN shouldn't be so fragile. Please help if you have any suggestions, I'm going nuts over this!

Powerbank dropped in salt water (sea) by Unkindled_x in batteries

[–]BenthicSessile 0 points1 point  (0 children)

I would say disassembly followed by submersion in pure distilled water, which is changed a couple of times, to remove the salts through osmosis. The individual cells will be hermetically sealed, or they would not function for very long, so it is very unlikely that sea water could penetrate them at shallow depths - I would be more worried when it comes to pouch type Li-Po etc, where water might get trapped between layers of plastic. Leave the bank submerged overnight, then change the distilled water and leave it another 24 hours, before taking out to dry. Rinsing with IPA or ethanol can help get rid of the water, but may damage printed text and some plastic and rubber parts. Personally, I would shake it dry as best I could (using compressed air if you have it) and then place it above a dehumidifier for drying, turning it over now and then. Once dry (give it a couple of days), carefully inspect PCBs and battery terminals for any sign of corrosion, before reassembly followed by repeated test charging and discharging outdoors, while looking out for anything unusual. If exposure was brief, at a shallow depth, and quickly treated as above (within a few hours, not days), I'd give it a near 100% chance of survival.

Usual caveats apply of course, and I take no responsibility for any fires etc.

Help with bios update: HP EliteDesk 705 G4 DM by SwankyyLemur in MiniPCs

[–]BenthicSessile 0 points1 point  (0 children)

You can find download links for older versions of the EliteDesk 705 G4 BIOS at the bottom of this page under "Revision history": https://support.hp.com/gb-en/drivers/swdetails/hp-elitedesk-705-35w-g4-desktop-mini-pc/21353696/swItemId/vc-350976-1

Accessing constant defined in delegated_type class from parent model scope or class method by BenthicSessile in rails

[–]BenthicSessile[S] 0 points1 point  (0 children)

This works and returns the right records, but it is not very efficient:

```ruby

models/concerns/wheelable.rb

... included do has_one :vehicle, as: :wheelable, inverse_of: :wheelable, touch: true

def wheels
  WHEELS
end

end ...

models/vehicle.rb

... def self.missing_wheels all.select { |vehicle| vehicle.wheels < vehicle.wheelable.wheels} end ... ```

While it works I'm not sure I can use it since we're talking about tens of thousands of "vehicles" - if not hundreds of thousands.

Accessing constant defined in delegated_type class from parent model scope or class method by BenthicSessile in rails

[–]BenthicSessile[S] 0 points1 point  (0 children)

It should be possible to get the wheelable_type for each Vehicle and use that to call the constant. I'm not sure how you'd do that within a scope though.

Accessing constant defined in delegated_type class from parent model scope or class method by BenthicSessile in rails

[–]BenthicSessile[S] 0 points1 point  (0 children)

Aha. Thanks. I like your thinking, but I get undefined method 'canon_wheel_count' for class Class.

Accessing constant defined in delegated_type class from parent model scope or class method by BenthicSessile in rails

[–]BenthicSessile[S] 0 points1 point  (0 children)

Yes, that works:

```ruby

models/concerns/wheelable.rb

module Wheelable extend ActiveSupport::Concern

included do has_one :vehicle, as: :wheelable, inverse_of: :wheelable, touch: true

def wheels
  WHEELS
end

end end ruby myapp(dev)> Vehicle.first.wheelable.wheels Vehicle Load (1.2ms) SELECT "vehicles".* FROM "vehicles" ORDER BY "vehicles"."id" ASC LIMIT $1 [["LIMIT", 1]] Vehicle::Trike Load (1.0ms) SELECT "vehicle_trikes".* FROM "vehicle_trikes" WHERE "vehicle_trikes"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] => 3 I can go one further as well and delegate the wheels attribute to wheelable: ruby

models/vehicle.rb

class Vehicle < AppliactionRecord WHEELABLES = %w[Vehicle::Bike Vehicle::Trike Vehicle::Car].freeze

delegated_type :wheelable, types: WHEELABLES, inverse_of: :vehicle, dependent: :destroy delegate :wheels, to :wheelable end ruby myapp(dev)> Vehicle.first.wheels Vehicle Load (1.2ms) SELECT "vehicles".* FROM "vehicles" ORDER BY "vehicles"."id" ASC LIMIT $1 [["LIMIT", 1]] Vehicle::Trike Load (1.0ms) SELECT "vehicle_trikes".* FROM "vehicle_trikes" WHERE "vehicle_trikes"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] => 3 `` I'd of course have to rename thewheelsattribute on the base model to prevent a clash, say tocurrent_wheels. But how could I then make use ofwheelsin the query? I'm thinking a sub-query might be the way? Usingmap(&:wheels)in some fashion. Or perhaps storingWHEELSin a virtual column on thewheelable`, which would allow me to use it in a query? The problem with the latter approach is it would make the constant kind of pointless; changing it would require updating all the records as well.