• 0 Posts
  • 7 Comments
Joined 2 years ago
cake
Cake day: July 17th, 2024

help-circle


  • I just use autossh for it.

    I run an ssh connection to a VPS I pay like $5, which forwards a port there. The screen in the following command isn’t required, but I have it so I don’t have to keep the terminal window open.

    screen -d -m -S autossh.eastusa.keepalive autossh -M 33333 -R VPS_IP_HERE:5555:localhost:22 root@VPS_IP_HERE
    

    Then from other computers, to connect back

    ssh -L 5555:localhost:5555 root@VPS_IP_HERE
    ssh root@localhost -p 5555
    

    For remote computers connecting back, the first ssh connects to the VPS and forwards a port to the remote computer. Then the 2nd ssh connection uses the forwarded port to complete the ssh connection to the computer behind the IP that can’t port forward.


  • Since you posted in /c/rust@programming.dev, I’ll give an answer for Rust.

    When thinking about rendering, there are mostly 2 ways to complete it

    1. You handle setting pixels (usually rgba) at x and y coordinates
    2. You use a graphics toolkit that handles rendering commonly used drawing methods. Like rendering circles of a specific size, rendering a line between 2 points, etc.

    For 1, the crate pixels provides rendering to x and y coordinates with the CPU to window. If you’re doing lots of operations, you’ll probably find this too slow, and not fast enough. To solve this problem, people use a GPU instead with shaders. vulkano-rs is a good, wgpu is also good.

    For 2, I don’t have immediate recommendations, but you can usually find these types of toolkits with game engines. As an example, bevy has an example of rendering shapes.

    It also just depends where you want to render. If you’re limited to in the browser, you’ll find that maybe vulcano won’t work, and you’ll have to use something like WebGPU instead. Or maybe you’re restricted to an environment where a web browser can’t be used, so WebGPU can’t be used, and Vulkano has to be how you complete it. Maybe you can’t use a GPU, and need to render directly to a canvas on web page in the browser, then you can just use the MSDN docs for the canvas. etc.



  • 0t79JeIfK01RHyzo@lemmy.mltolinuxmemes@lemmy.worldI was wrong, you guys
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    2 months ago

    We can imagine many scenarios, but the most plausible scenario is that she presented herself to him as entirely willing. Assuming she was being coerced by Epstein, he would have had every reason to tell her to conceal that from most of his associates.

    I’ve concluded from various examples of accusation inflation that it is absolutely wrong to use the term “sexual assault” in an accusation.


  • I like this solution more too, what about something like?

    code examples
    {
        spawn(async move {
            do_something_else_with(
                ^{ self.some_a.clone() },
                ^{ self.some_a.clone() },
                ^{ self.some_a.clone() },
            )
        });
    }
    

    Which desugars to

    {
        let (a, b, c) = (self.some_a.clone(), self.some_a.clone(), self.some_a.clone());
        
        spawn(async move {
            do_something_else_with(a, b, c)
        });
    }
    

    Then have like

    'super1: {
        'super2: {
            spawn(async move {
                do_something_else_with(
                    ^super1: { self.some_a.clone() },
                    ^super1: { self.some_a.clone() },
                    ^super1: { self.some_a.clone() },
                )
            });
        }
    }
    

    Which desugars to

    'super1: {
        let (a, b, c) = (self.some_a.clone(), self.some_a.clone(), self.some_a.clone());
    
        'super2: {
            spawn(async move {
                do_something_else_with(a, b, c)
            });
        }
    }
    

    And finally, the harder to read

    'super1: {
        'super2: {
            spawn(async move {
                do_something_else_with(
                    ^^{ self.some_a.clone() },
                    ^^{ self.some_a.clone() },
                    ^^{ self.some_a.clone() },
                )
            });
        }
    }
    

    Which desugars to

    'super1: {
        let (a, b, c) = (self.some_a.clone(), self.some_a.clone(), self.some_a.clone());
    
        'super2: {
            spawn(async move {
                do_something_else_with(a, b, c)
            });
        }
    }