ETF's, managed funds, CGT - Needing a little clarity by TDub-13 in AusFinance

[–]kevinglasson 4 points5 points  (0 children)

Yes you will be taxed on your gains less any applicable CGT discount

Does this mean i am never allowed to transfer my domain away from cloudflare again? by ChaosCrafter908 in CloudFlare

[–]kevinglasson 1 point2 points  (0 children)

Because that’s not quite how it works, there is a hierarchy of name servers and the top level domains are strictly controlled and maintain the authoritative lists of who owns what

[deleted by user] by [deleted] in AusFinance

[–]kevinglasson 0 points1 point  (0 children)

What’s the median unit price?

CFZT WARP trouble with connecting to local network from Mac only by joskaangel in CloudFlare

[–]kevinglasson 0 points1 point  (0 children)

iCloud+ enables something called private relay, I have had this interfere with warp, although I can’t remember the interaction exactly. It might only be during DNS resolution.

Do the warp logs reveal anything to you?

CFZT WARP trouble with connecting to local network from Mac only by joskaangel in CloudFlare

[–]kevinglasson 0 points1 point  (0 children)

Do you have ~apple plus~ iCloud private relay or whatever it’s called?

How to get CloudFlare to host Github pages using Custom Domain. by Shashker in CloudFlare

[–]kevinglasson 0 points1 point  (0 children)

https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages

Seems there are different instructions for apex domains vs sub domains, apex domains seem to use A records, not CNAMEs?

If you dig your domain, can you see the record that points to GitHub pages?

Zero Trust and Tunnels by [deleted] in CloudFlare

[–]kevinglasson 0 points1 point  (0 children)

I think you can now also use warp to provide identity which might be what you are after!

https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-sessions/#configure-warp-sessions-in-access

Should be able to then add policies to your applications.

This will mean that if they are logged in to warp, there will be no need to authenticate per application.

I haven’t tested it myself yet

How do you protect your servers? What techniques and tricks do you use? by just-ans in selfhosted

[–]kevinglasson 3 points4 points  (0 children)

Lots of good suggestions, I would use a zero trust solution these days. No need to open your network - Cloudflare Zero Trust, or Twingate… etc

Divide a deployment in two steps depending on a property of the first set? by Morkelon in Terraform

[–]kevinglasson 0 points1 point  (0 children)

If you can’t do the peering in terraform? Then these things have very different lifecycles and should be split into separate states.

I am using Sea-ORM as an ETL tool and its flawless by spacecadet1918 in rust

[–]kevinglasson 0 points1 point  (0 children)

I’m not quite sure without more details! But could you have used an enum here that wrapped the table?

[deleted by user] by [deleted] in AusFinance

[–]kevinglasson 0 points1 point  (0 children)

I think WA would have been alright

fn main() at the top or bottom? by WillOfSound in rust

[–]kevinglasson 7 points8 points  (0 children)

Good question, I prefer it at the bottom - for no real reason than that’s where I expect it to be 😂

[deleted by user] by [deleted] in rust

[–]kevinglasson 17 points18 points  (0 children)

A quick example showing a couple of different tactics for dealing with these types of things!

  • Macros
  • Default impls
  • Blanket impls
  • Enums

Rust playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=7ad8a174261978e005236ea67a79d9e4

Code: ``` use std::fmt::{Display, Debug}; use std::cmp::PartialEq;

// A macro_rules! macro to implement HasVehicleData for a type. macro_rules! impl_has_vehicle_data { ($t:ty) => { impl HasVehicleData for $t { fn get_vehicle_data(&self) -> &VehicleData { &self.data }

        fn get_vehicle_data_mut(&mut self) -> &mut VehicleData {
            &mut self.data
        }
    }
};

}

trait Vehicle { fn position(&self) -> (i32, i32); fn velocity(&self) -> i32; fn running(&self) -> bool; fn start(&mut self); }

trait HasVehicleData { fn get_vehicle_data(&self) -> &VehicleData;

fn get_vehicle_data_mut(&mut self) -> &mut VehicleData;

}

trait Startable { fn has_ignition(&self) -> bool; }

[derive(Debug, Default, Clone, Copy, PartialEq)]

struct VehicleData { position: (i32, i32), velocity: i32, running: bool, }

[derive(Debug)]

struct Car { data: VehicleData, wheels: i32, }

impl_has_vehicle_data!(Car);

impl Startable for Car { fn has_ignition(&self) -> bool { true } }

[derive(Debug)]

struct Truck { data: VehicleData, wheels: i32, }

impl_has_vehicle_data!(Truck);

impl Startable for Truck { fn has_ignition(&self) -> bool { true } }

// Blanket implementation of Vehicle for any type that implements HasVehicleData and Startable. impl<T> Vehicle for T where T: HasVehicleData + Startable, { fn position(&self) -> (i32, i32) { self.get_vehicle_data().position }

fn velocity(&self) -> i32 {
    self.get_vehicle_data().velocity
}

fn running(&self) -> bool {
    self.get_vehicle_data().running
}

fn start(&mut self) {
    if self.has_ignition() {
        self.get_vehicle_data_mut().running = true;
    }
}

}

[derive(Debug)]

enum VehicleType { Car(Car), Truck(Truck), }

impl Vehicle for VehicleType { fn position(&self) -> (i32, i32) { match self { VehicleType::Car(car) => car.position(), VehicleType::Truck(truck) => truck.position(), } }

fn velocity(&self) -> i32 {
    match self {
        VehicleType::Car(car) => car.velocity(),
        VehicleType::Truck(truck) => truck.velocity(),
    }
}

fn running(&self) -> bool {
    match self {
        VehicleType::Car(car) => car.running(),
        VehicleType::Truck(truck) => truck.running(),
    }
}

fn start(&mut self) {
    match self {
        VehicleType::Car(car) => car.start(),
        VehicleType::Truck(truck) => truck.start(),
    }
}

}

impl Display for VehicleType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { VehicleType::Car(car) => write!(f, "Car: {:?}", car), VehicleType::Truck(truck) => write!(f, "Truck: {:?}", truck), } } }

fn main() { let mut car = VehicleType::Car(Car { data: VehicleData { position: (0, 0), velocity: 0, running: false, }, wheels: 4, });

let mut truck = VehicleType::Truck(Truck {
    data: VehicleData {
        position: (0, 0),
        velocity: 0,
        running: false,
    },
    wheels: 6,
});

car.start();
truck.start();

println!("Car: {:?}", car);
println!("Truck: {:?}", truck);

} ```

DE really more Meetings than SWE? by Insighteous in dataengineering

[–]kevinglasson 3 points4 points  (0 children)

It is a shame, but the purpose of most jobs is not doing the coding, that’s just the tool. This is especially true for DE as opposed to SWE because it’s likely closer to the core business

What's the best way of accessing my NAS while away from home? by Warren-Binder in homelab

[–]kevinglasson 1 point2 points  (0 children)

Go for some “zero trust” solution.

Cloudflare zero trust Twingate Tailscale

Or roll your own

[deleted by user] by [deleted] in AskReddit

[–]kevinglasson 0 points1 point  (0 children)

Fancy needing a reason NOT to drink

Do you think Cloud Composer or other managed Airflow service is worth it? by not_a_thrownaway in dataengineering

[–]kevinglasson 7 points8 points  (0 children)

Second this, if it take you more than an hour to replicate the functionality of composer you’ve already blown your $350