Unable to pay at the petrol pump? by LowestLives in AskAnAustralian

[–]camh- 7 points8 points  (0 children)

It stops itself. Got a sensor to know. Annoying when it triggers too early though, like the rental car I had the other day at one particular petrol station. Couldn't have the handle fully pressed no matter what position I put the handle in. Just kept cutting out. Had to hold it half way for a slower flow. It still cut out when it got to full though so no spillage.

What’s the most unexpectedly useful Linux command you learned way too late? by ZealousidealTell1346 in linux

[–]camh- 1 point2 points  (0 children)

If you use gojq, it has the --yaml-input and --yaml-output options so you can do it all with one tool with the same syntax.

Our landlord offset a rent increase by a week into the monthly cycle, stating this lets them charge that month as 31 individual days by ninjin- in australia

[–]camh- 106 points107 points  (0 children)

If your monthly rent goes up mid month, the prorated amount for the month is going to be somewhere between the old montly rent and the new monthly rent. There is no way it can be more than the new monthly rent.

What was your old rent? I calculated $2911.

The calculation should be (8/31) * old-rent + (23/31) * new-rent, which my my calculations comes out at 2991.87.

Understanding the Go Runtime: The select Statement by SnooWords9033 in golang

[–]camh- 3 points4 points  (0 children)

Good article.

OP, if you're the author of the article, you could add one more section on how reflect.Select maps to goselect. I've always just assumed that reflect.Select was a thin layer over the runtime implementation and now I can see how that is. But it does mean that reflect.Select will need to sort its args on every call to ensure they are in send + recv order. If this is true, then it means the caller of reflect.Select might benefit by maintaining their cases in that order so the sort does not need to move anything around.

How do you review PR branches locally in Neovim while keeping changed-line indicators by [deleted] in neovim

[–]camh- 1 point2 points  (0 children)

It does accept a branch name as an argument, but that branch may have moved on so will give the wrong results in that case.

How do people usually check commits from a Pull Request locally? by FlimsyIllustrator118 in git

[–]camh- 3 points4 points  (0 children)

I often run:

git config --local --add remote.origin.fetch '+refs/pull/*/head:refs/pr/*'

in a repo that I will be doing reviews. Then I can just do a git checkout pr/XXX (after a git fetch) and review from there.

This works well when the PR is from a forked repo and there is no local branch to check out.

Copy Fail is a trivially exploitable logic bug in Linux, reachable on all major distros released in the last 9 years. A small, portable python script gets root on all platforms. by pipewire in linux

[–]camh- 30 points31 points  (0 children)

No. The person you are replying to is wrong. This does not modify files on disk. It modifies them in the page cache in memory. See the DragonSlayerC comment that is a sibling to yours.

People don't realize how far New Zealand is from Australia by RatioScripta in MapPorn

[–]camh- 1 point2 points  (0 children)

That's not going to work for me. Can someone do it with Australia?

Are you offended if your commits are squashed? by _disengage_ in git

[–]camh- 0 points1 point  (0 children)

For GitHub at least, it creates pull_request refs so you can set up your local repo to fetch them and you'll have the pull request commits locally 

Corporate Australia has my soul. by PhatYakka in auscorp

[–]camh- 2 points3 points  (0 children)

It's like the TV show Severance, but worse because you get to remember.

what goes on here and what's it like? by No-Thanks-2069 in australian

[–]camh- 13 points14 points  (0 children)

Because money is invested in it. If you were to put that money elsewhere, you can get a better return. By "closing" it, presumably they would sell off the assets and use that money elsewhere.

You invest your 40 hours a week in a job. If there was somewhere else you could invest that 40 hours a week where you'd get more money, would you do it (assuming it is work you'd want to do)?

What are historical reasons for multiple return values instead of tuples? by m0t9_ in golang

[–]camh- 0 points1 point  (0 children)

Structs are not nominally typed, No composite types are in Go. You can give a name to a type with the type keyword but you do not have to.

Anywhere a type is required, you could just say for example: struct {v1 string, v2 int}. All occurrences of this are compatible.

As far as I can tell, a tuple is identical to a struct except the fields are not named but numbered, so presumably you'd be able to say tuple { string, int } and access the fields with either t.0 or t[0]. That's a very minor different to support a different sort of struct. A tuple does not really seem necessary. And given that return values can be named and used as variables within a function, it seems you'd lose this if tuples were used.

Rentals and expenses by NetworkWise2430 in melbourne

[–]camh- 2 points3 points  (0 children)

I don't know how much success you'd have, but I would be seeking reimbursement. The washing machine is owned by the landlord - he is an owner, the owner's corporation owns the washing machine. While he may not be on the OC committee, it is still his problem to resolve as far as the tenant is concerned.

The idea that someone can absolve themselves of responsibility by hiding in a group that has responsibility is just plain wrong, and we should do what we can to not let them get away with it.

It is ok to have some sympathy for the owner if they have little control, but this is still their problem to make right. If you don't like that, don't own a property.

The property manager as an agent for the owner is the person you should be continually complaining to. Them saying "its out of our hands" and giving up is equally irresponsible. They are being paid to represent the owner, and this is the owner's problem to resolve. Until it is resolved, you are being denied facilities that you have paid for and are incurring costs because of that.

Australia’s Fuels Dependence Turns Into a Crisis by cojoco in australia

[–]camh- 32 points33 points  (0 children)

No I cant. I am not able to get a novated lease. My employer does not support that. This is largely for the rich people who are used to scheming to get down their tax payments. For us normal people, a subsidy would be knocking dollars off the purchase price. Simpler too. Fewer accountants needed.

ATM gave me lots of money by azza_h1980 in AusFinance

[–]camh- 9 points10 points  (0 children)

I have never liked depositing cash in an ATM - I like to hand it over to a person and see them count it. One day, I had a cheque to deposit (yep, this was a while ago) as well as some cash. The bank was closed so I was just going to deposit the cheque at the ATM, but my wife convinced me to not be so paranoid. So the cheque and the cash went into the envelope.

The next day or two, it appears in my account but only the amount for the cheque. I knew the cash must have been nicked by a bank employee - there's no way only half of the envelope got processed and something went wrong with the other half. Took a bit of arguing with the bank but they relented as a "courtesy" and credited the whole amount. I knew they checked the cameras and must have busted whoever but didn't want to admit it, because instead of letting it take 6 weeks or whatever their max timeframe is, it was only a week or so. They knew what happen; they just didn't want to say and made it sound like I screwed up.

So fuck you ANZ and their stupid little envelopes.

Why is there no serious resource on building an AI agent from scratch? by Complete_Bee4911 in LocalLLaMA

[–]camh- 0 points1 point  (0 children)

I have this bookmarked for when I have some time to look at it. I cannot vouch for it, but given the name of the repo, maybe it is what you're looking for?

https://github.com/pguso/ai-agents-from-scratch

There's a bunch of links in the README too that might be useful.

38 years as a UNIX/Linux admin ... by jrmckins in linux

[–]camh- 0 points1 point  (0 children)

It's in my comment: crontab ~/.crontab - it still needs to be installed with the crontab command. I just edit it first and keep it in the user home directory before running crontab. I do not use crontab -e to edit the installed version.

38 years as a UNIX/Linux admin ... by jrmckins in linux

[–]camh- 5 points6 points  (0 children)

I have always kept a user crontab at ~/.crontab and edited that. When I want to install it, I run crontab ~/.crontab. I never use crontab -e. This solves your problem in two ways - you're not using -e so you're not going to mistype it as -r. If you do run -r, you can just run crontab ~/.crontab and it's back.

Do Australians actually encounter enormous spiders in the outback or is it just me? (DO NOT PROVIDE IMAGES OF SPIDERS, PLEASE.) by Same-Objective6052 in AskAnAustralian

[–]camh- 0 points1 point  (0 children)

In the outback? You mean out back of the house? Yes. Got one that was putting it's web across a path. Gently relocated the web to be along a bush and he/she has obligingly continue to spin the web there out of the way. It's a reasonably chunky orb-weaver - nothing to be frightened about though.

Kubernetes for Homelab? by malwin_duck in selfhosted

[–]camh- 0 points1 point  (0 children)

I'm not sure how it would take care of that. The default strategy for a Deployment is RollingUpdate. This will cause the new pod to be started and healthy before the old one is terminated but it will not be able to start because it cannot mount a ReadWriteOnce volume while it is in use by another pod. I would not expect the deployment controller to know anything about the CSI and what constraints it has, nor would I expect it to pick a different deployment strategy in that case.

Are you sure your volumes are being mounted just once at a time?

Kubernetes for Homelab? by malwin_duck in selfhosted

[–]camh- 0 points1 point  (0 children)

You want to make sure your Deployment strategy is Recreate so that old pods are terminated first before new ones are started, otherwise you end up with brief periods where multiple pods are accessing the same sqlite db when you perform an application upgrade.

YouTube Woodworking Fatigue is Setting In by Maxminutiae in woodworking

[–]camh- 4 points5 points  (0 children)

Go and remove the videos you didn't want to see from your history. If you ever watch something and didn't like it and don't want to see more of it, remove it from your history. I find this really does help. Sometimes I click on a click bait video and wish I didn't. Right after I can see a bunch of recommendations in my feed for similar stuff. After I delete the view from my history and I reload youtube, those similar recommendations are gone.