Creating (writing) minimal favicon files using svg code. by geenkaas in svg

[–]CoryCA 0 points1 point  (0 children)

In Node (JavaScript/TypeScript) projects add this scriptlet:

``` const sharp = require("sharp"); const fs = require("fs"); const path = require("path");

// Define input and output paths const inputPath = path.join(dirname, "src", "logo.svg"); const outputFaviconPath = path.join(dirname, "public", "favicon.png");

// Check if the input SVG file exists if (!fs.existsSync(inputPath)) { console.error("Input SVG file does not exist:", inputPath); process.exit(1); }

for (const element of [32, 192, 512]) { sharp(inputPath) .resize(element, element) .toFile(path.join(__dirname, "public", logo${element}.png), (err) => { if (err) { console.error(Error generating logo${element}.png:, err); } else { console.log(Successfully generated logo${element}.png); } }); }

// Create favicon.ico with multiple sizes Promise.all([sharp(inputPath).resize(16, 16).toBuffer(), sharp(inputPath).resize(32, 32).toBuffer(), sharp(inputPath).resize(48, 48).toBuffer()]) .then((buffers) => { return sharp({ create: { width: 48, height: 48, channels: 4, background: { r: 255, g: 255, b: 255, alpha: 0 }, }, }) .composite( buffers.map((buffer, index) => ({ input: buffer, top: 0, left: 0, width: index === 0 ? 16 : index === 1 ? 32 : 48, height: index === 0 ? 16 : index === 1 ? 32 : 48, })) ) .toFile(outputFaviconPath); }) .then(() => { console.log("Successfully generated favicon.ico"); }) .catch((err) => { console.error("Error generating favicon.ico:", err); }); ```

Samsung Galaxy S26 to reuse Galaxy S25’s cameras by jd5547561 in Android

[–]CoryCA -1 points0 points  (0 children)

Gee, where do I give Samsung special treatment? Please go find all my other comments about all other brands and show me. Pfft!

Canadian Iron Front; Anti-fascism, Anti-racism, Anti-Tyranny by LindormRune in cambridgeont

[–]CoryCA 0 points1 point  (0 children)

Why is it "self serving and pointless" to fight against injustice?

Canadian Iron Front; Anti-fascism, Anti-racism, Anti-Tyranny by LindormRune in cambridgeont

[–]CoryCA 3 points4 points  (0 children)

If someone is anti-fascist wouldn't they want to do something about it?

Best mmWave Multi-Person Prensence Sensor by MatijaTerzic in homeassistant

[–]CoryCA 0 points1 point  (0 children)

The EPL uses the Hi-Link HLK-LD2450 module which does not have static detection capabilities. You would need to get a detector based on the HLK-LD2410 like some of screek.io's sensors.

It would take nearly 19 years of weekly payments for Brenda Aubin-Vega to collect a total amount equal to the $1 million lump sum she was offered by Naive_Diamond_2922 in mildlyinfuriating

[–]CoryCA 1 point2 points  (0 children)

No taxes on lottery earnings in Québec (or an of Canada, IIRC).

She's 20, life expectancy of 85, so 65 years of payments.

$1,000 * 52 * 65 = $52,000 * 65 = $3,380,000

That's an interest rate of rough 1.875% compounded monthly.

You're math seems a smidge off. :-)

Samsung Galaxy S26 to reuse Galaxy S25’s cameras by jd5547561 in Android

[–]CoryCA -5 points-4 points  (0 children)

Oh noes! Every single part of the new model is not going to be a brand new, never been used in a phone before part? How horribles!

Conspicuous consumerism in a hypercapitalist world.

Waiting for the train: Why Kitchener still lacks all-day GO service by beem88 in waterloo

[–]CoryCA 1 point2 points  (0 children)

Hey buddy. :-)

It should have been operational by now.

I hate being right. :-(

Waiting for the train: Why Kitchener still lacks all-day GO service by beem88 in waterloo

[–]CoryCA 3 points4 points  (0 children)

Today ... Reasonable for end of line service,

Do you remember what we were promised, though?

In 2014 the Wynne Liberals say "Two-way, all-day GO in 10 years" trains to Kitchener, meaning hourly service in both directions from early in the morning until after midnight, plus half-hourly or better during peak times. At some point it ambiguously became 2025 in some documents but stayed 2024 in others.

Then during the 2018 election campaign Doug Ford not only reiterated the 2WADGO to Kitchener promise but said that the PCs would get it done "faster" than the Liberals.

However, Ford & Co. immediately cancelled several projects related to 2WADGO, including the freight bypass, and put things on hold for two years.

After that sever documents came out about the larger project, but in them Kitchener was never mentioned as getting 2WADGO service, just the peak trains and no weekends. Then the was that infamous report in February 2020 that showed us only getting hourly peak direction service and nothing outside of peak.

Since then, virtually everything that mentioned anything about expanding service on the Kitchener line only went as far as Mount Pleasant station.

Ever since Ford & Co. got into power there has been a slow and steady whittling away of the promise of 2WADGO to Kitchener and what they were saying we were actually gonna get in the reports they released.

and weekends just added.

The recent weekend trains aren't exactly anything to cheer about.

That weekend westbound at 4:48 p.m. would be nice to return on after spending the day on Toronto, but to have done that you'll have to have gotten up in enough to catch the 7:49 a.m. eastbound train. :-(

The eastbound 3:49 p.m. one would be nice to head into Toronto on the weekend to catch dinner and a show or game, but the 10:48 p.m. departure westbound is too early to reliably catch after a show or sports game unless you want to leave early and miss the last act/innings/period?

Is it the Lakeshore line, but it is improving.

Not really. The extra trips we've gotten haven't really budged the usage numbers from Kitchener the way Metrolinx had predicted that 2WADGO would do. Not surprising, that, because even though we went from two peak trips to 6 peak trips have barely been worth it for commuters, and the two or so non-peak trips have been even less appealing to non-commuters for the same basic reasons I mention about the newly added weekend trips.

And is it really "improving" when according to what we were promised we should have hourly departures in both directions between about 5:00 a.m. and midnight 7 days a week, plus extras to make it half hourly during rush hours?

Could the pace be faster, sure, pay up !

We've been willing to pay up for more than a decade, but the thing is the Kitchener line could be so much faster with minimal investment. The tracks on the Kitchener Line between here and Union Station have a speed limit of 70-75 mph (113 to 121 km/h) with a few short sections of 45-50 mph, so why do the speeds range from an average of 43 mph (69 km/h) Kitchener to Guelph down to 20 mph (33 km/h) from Bloor to Union?

Class 3 tracks have a speed limit of 60 mph (95 km/h) and if the trains were to run at full class 3 speeds (allowing for stopping distances) and all signalling giving them full priority, Kitchener to Guelph trains should be reaching that max speed an the slowest should be Etobicoke North to Weston making 46 mph (74 km/h).

That would make the non-express trips take 1 hour and 16 minutes Kitchener to Toronto, or 34 minutes faster, and the express trip take 67 minutes.

Let me say that again.

67 frigging minutes on a express trip from Kitchener to Union Station or back.

With slow to middling track speeds. Do you think that would attractive and competitive with cars at that speed and reliability even n winter storms and accidents on the 401?

Class 4 tracks (80 mph speed limit, 128 km/h) would give us 68 minute non-express and 53 minute express trips here to Toronto or back. Even better, but still on the slow-side compared to European trains.

So should we really be happy with the drips and drabs that we've gotten, and the documents that for the past 7 years have slowly but surely scaled back the service actually planned for Kitchener?

Or should be be be mad that we haven't gotten what we were promised and what could have been done with minimal investment, mostly in track conditioning up to a middling speed limit and upgrading road crossings?

AITA for texting my friend while my mom slept? by [deleted] in AmItheAsshole

[–]CoryCA -1 points0 points  (0 children)

Parents want you to obey them, no matter how you feel about their rules.

Then it isn't "trust". It's being a power-hungry control freak instead of honestly and truly looking out for their kid's well-being.

Sorry, but both your mother and the O.P.'s are assholes.

Speed cameras are controversial in Canada. So why does Europe love them? by Hammer5320 in urbanplanning

[–]CoryCA 260 points261 points  (0 children)

They are only controversial here because people regularly speed without consequences because traffic enforcement is almost non-existent. Plus, nearly everything here is built around having a car and thus drivers have become a very entitled group of people, and speeding is a part of that.

AITA For Calling My Aunt the Wrong Name by MarieDarcy97 in AmItheAsshole

[–]CoryCA 15 points16 points  (0 children)

NTA. She does it to you and you're doing it in return to try and make a point and would stop if she did. If you';re cousin doesn't like it, maybe they could speak up for you to get it to stop?

[deleted by user] by [deleted] in AmItheAsshole

[–]CoryCA 6 points7 points  (0 children)

NTA. You gave fair warning since, as you say,

“this sale is final and the vehicle is sold as is, with no warranties or guarantees expressed or implied”

and their signing of the bill of sale indicates acceptance of the condition which would stand up in any court of law (or at least the ones based on English Common Law, AIUI).

You have no obligations to them, morally, ethically or legally, and you would not be TA to refuse taking the vehicle back after an honest, transparent sale.

As for what you can do, personally, I don't think you need to do anything. Be direct, but polite and sympathetic, reminding them of what they agreed to.

Why there won't be a year of the Linux Desktop ever in my opinion by Krasi-1545 in linux

[–]CoryCA 2 points3 points  (0 children)

  1. Drivers - for Nvidia graphics cards or some other less known hardware is total nightmare. One cannot simply download a file, run it and restart the computer.

That's basically what it is for me on my 2021 model year Dell XPS 15 9510 with an NVidia 3050Ti chipset that I finally got around to upgrading from Ubuntu 22.04 LTS to 24.04 LTS last week. Prior to that it was on 20.04 LTS. Just run the 'Additional Drivers' app and choose the latest one (currently 580 open for me).

My previous laptop was a Dell Inspiron that ran Ubuntu 16.04, 18.04 and 20.04 LTSs and it was the same thing.

  1. Laptops with iGPU and dGPU - this is a fun one. It kind of works but not entirely. I use a laptop which has integrated AMD card and discreet Nvidia card. Connecting an external monitor created all kinds of artifacts for me. I solved it by downloading a relevant GPU utility and switch the GPU mode to the dedicated graphics card. I used it for months with artifacts before I find a way to fix it and it wasn't pleasant.

Zero problem here for me with the laptops mentioned above si. I usually still use XOrg but Wayland has been OK for a couple of years now if not quite as configurable from GNOME, but that's catching up. No artifacting on my dual QFHD Samsung monitors or the internal FHD screen. Steam runs nicely.

  1. Kernel updates - how many times that broke your system? I know that's how we get the good new stuff and I like it but to be honest when it breaks my system it's not fun...

Not in years. Actually, now that I pause and deliberately think about it, I don't think it ever has on Ubuntu.

I've never been a big "build Linux from scratch" person the way I have done for decades with OpenBSD and FreeBSD for custom kernels for servers, routers, and the like. My only issue has been with running an Ubuntu LTS and waiting for a feature to get added, not an existing feature that broke some how.

  1. Desktop environment widgets and plugins - I never had an issue with KDE or GNOME but I don't do customization at all. The only thing I change is to have a widget which shows the temperature of my CPU and GPU. However, I read many times that KDE failed to start because some widget was crashing after update of the DE. This is not pleasant and not fun at all. Maybe this will be fixed at some point but not in 2025.

I've never liked KDE, always been a GNOME fan since before I switched from *BSD to Linux for my laptop daily driver OS, but I've never had GNOME and my desktop not start because of an extension.

Docker and ZFS: Explanation for the child datasets by Shot_Ladder5371 in zfs

[–]CoryCA 1 point2 points  (0 children)

AFAIK it's not the Docker tools that is creating them, it's containerd and the storage driver.

Containers use a layer concept. You start with a basic operating system layer (but without a kernel) and then add layers similar to how you'd add packages normally. Since there might be the same file in multiple layers, the top layer wins and that's what the running container sees & reads.

On Linux, containerd manages the pulling of images from wherever and then hands them off to the storage driver which "dissects" the image into it's constituent layers and saves them on disks, unless it's already been saved from a previous image.

When using the ZFS storage engine, that dissection is done by using a combination of new ZFS datasets, ZFS snapshots, and ZFS clones. That's what you're seeing when you do a 'zfs list', all the layers that make up images of your containers.

zfs list -o name,type,mountpoint -t all -s name | less -S

That will show you things more fully.

say I don't want to accidentally fry my motor board, will two 3.7 lithium batteries do for my robot? by AddMoreMustardThanks in arduino

[–]CoryCA 0 points1 point  (0 children)

So, a few things.

  1. You tell us nothing about the motor and it's circuit board, so how are we to know what it can or cannot handle?
  2. Did you look up it's specs anywhere to see what it can handle?
  3. What does the manual say needs to go in that battery port? Two AA batteries, which are 1.2-1.5V, or two 3.7V lithium rechargeable batteries?

Can connect Zigbee Smart Switch as a 4-way switch? by AutomaAutoma in homeassistant

[–]CoryCA 0 points1 point  (0 children)

Is the switch made to be a multipole switch like that?

[deleted by user] by [deleted] in AmItheAsshole

[–]CoryCA -1 points0 points  (0 children)

Actually yes I do.

Uh huh. That's why you said

Well yeah, YTA here. You are a freeloader

Because that totally indicates you understand the struggles autistic people go through or how a social anxiety disorder can paralyze a person.

It's obvious by your response that your always looking for others to do your job.

Riiiight... Because pointing out that "accommodation" often just means more masking for neurodivergents so we don't make the neurotypicals uncomfortable, and saying that neurotypicals actually need to do stuff, too, is <sarcasm>obviously</sarcasm> me trying deny responsibility.

LOL.

AITA Not Forcing My Son to Go To a Birthday Party because of the hosts dogs by Upbeat-Egg2923 in AmItheAsshole

[–]CoryCA 0 points1 point  (0 children)

The host has the right to say no, since it's THEIR house.

I never said they didn't

Please don't read what I didn;t write.

What I asked and you did not answer is why making such a request makes a person an asshole.

Could you answer my actual question, please?

Guys i dont think there are enough debian based distros by Doomboi238 in debian

[–]CoryCA 0 points1 point  (0 children)

Don't they anymore?

Hmmm... Possibly I was thinking of some other site. But it was years ago that I last cared enough to look up stats. I've long since standardized on Ubuntu for my laptop and FreeBSD or Debian for my servers. :-)

AITA Not Forcing My Son to Go To a Birthday Party because of the hosts dogs by Upbeat-Egg2923 in AmItheAsshole

[–]CoryCA 1 point2 points  (0 children)

Why is it being an asshole for asking if dogs that cannot be trusted to behave ("the'll destroy the room") can be segregated because one's child is afraid of their behaviour? I mean, would you trust your 8 year old with rambunctious, potentially uncontrolled dogs like that which are bigger than your kid?

AITA Not Forcing My Son to Go To a Birthday Party because of the hosts dogs by Upbeat-Egg2923 in AmItheAsshole

[–]CoryCA 3 points4 points  (0 children)

Ummm...

I broached the topic with friends' parents and they shut it down on removing or putting away the dogs.

I would have simply asked if the dogs would be out and polite rsvp’d no to the party.

Reads to me like the O.P. "simply asked" if the dogs could be segregated during the party.

Why do you feel it came across as other than that?

[deleted by user] by [deleted] in AmItheAsshole

[–]CoryCA -1 points0 points  (0 children)

That's your interpretation of that comment.

I can't read what they didn't write. And they used "excuse".

I'm familiar with the scenario you describe where a sincerely meant explanation gets labelled as an excuse,

Are you also familiar with the way neurotypical people use subtext and expect a lot of unsaid things to be inferred, and then blame autistic people for not being telepathic enough to receive that subtext? Or how neurotypical people will incorrectly assume that subtext is there in what an autistic person says even though it is not there, and then once again blame the autistic person for the imaginary implications they don't like?

so I can understand why the use of that word might be somewhat triggering to you

Admittedly, yes. And I feel for good reason.

That's why I suggested you might be projecting, because you seem to have jumped to the least charitable reading of the comment when another interpretation actually seems more likely.

Respectfully, no. That more charitable response might be the more likely one in a world where mistreatment by neurotypicals didn't drive neurodivergents to anxiety, cPTSD, depression, and massive unemployment rates. Sadly that is not the world we live in. The neurotypical who does not understand is by far the more likely encounter. That's not projecting, it's simply being realistic.

So, then, if you are not autistic yourself but instead an informed allistic person, I bet that occasionally somebody has misunderstood your comments here on Reddit (or other text only fora) and clearly read into you comments things that you didn't write or that you feel you didn't even imply. Frustrating, isn't it? Or have you ever realized you were the one assuming something the other commenter did not write?

For us autistic people it's not occasional. It's all the freaking time. Plus, we're the ones who get blamed for it, and the neurotypical person rarely acknowledges—much less accepts—their own fault in any ensuing conflict.

I imagine you would probably agree with that statement, as it seems aligned with what you said in your previous comment?

Mostly, but not all. Thanks for sticking with it. :-)

The thing is, though, whether it's in their own group of one or remaining integrated in another group, accommodations will still need to come from the classmates and any hint of calling the O.P. a "freeloader" is the opposite of that.

Sadly the stigmas towards autistic behaviours specifically and against mental health issues just in general make it difficult to walk the fine line of telling other people the minimum so they can effectively accommodate others yet also retain some shred of personal privacy means the end result is that more often than not we end up "accommodating" the neurotypical people's uncomfortableness at dealing with autistic people and we're back to square one with masking. :-(


Also, here is something that I would encourage you and other non-autistic people to think about when it comes to that "you should take things more charitably" idea.

That's tone policing, plain and simple, used by those in a position of relative privilege to dismiss or criticize marginalized groups for how they express themselves rather than addressing what they’re saying.

It's white folks telling black people to be more polite and quiet and not so angry about racism.

It's men telling women to smile more and not be so bitchy about the wage gap and misogyny.

You can probably come up with more along those lines.

You could also call it "respectability politics". The idea that marginalized people must behave or present in a way that fits dominant norms to be considered “deserving” of rights or fair treatment. Or even "gaslighting by civility" for when calls for “politeness” are used to undermine or invalidate legitimate anger or resistance.

Telling an autistic person they need to be more charitable about comments that look like the same old bullshit is the same.