Readit News logoReadit News
lamnguyenx commented on Show HN: Figma-use – CLI to control Figma for AI agents   github.com/dannote/figma-... · Posted by u/dannote
lamnguyenx · 2 months ago
What's your opinion on PenPot - Figma's biggest rival? I think PenPot is more dev-friendly. Their "Code" mode is 100% free
lamnguyenx commented on OmniHuman-1: Human Animation Models   omnihuman-lab.github.io/... · Posted by u/fofoz
lamnguyenx · a year ago
NVIDIA Demo of Audio2Face is such a joke, compared to this one.
lamnguyenx commented on Show HN: Bluetooth USB Peripheral Relay – Bridge Bluetooth Devices to USB   github.com/bahaaador/blue... · Posted by u/bahaaador
lamnguyenx · a year ago
Does this work with Raspberry Pi 4 or Raspberry Pi Zero 2 W? Unfortunately I don't have Pi Zero W lying around :(
lamnguyenx commented on Dance training superior to physical exercise in inducing brain plasticity (2018)   journals.plos.org/plosone... · Posted by u/Tomte
lamnguyenx · a year ago
I have the same question to playing the piano. By every piano playing (30-60 mins per day), can we enhance our brain capacity and delay the age of dementia?
lamnguyenx commented on Visual guide to SSH tunneling and port forwarding (2023)   ittavern.com/visual-guide... · Posted by u/todsacerdoti
cfinnberg · a year ago
I think that using 0.0.0.0 it's a bad idea. That is supposedly opening the port in all network interfaces, including the external ones. So, if you don't have a firewall (especially on the remote server) you are exposing something to the world.

OTOH if I'm going to use some tunnelling/port forwarding quite often, I would use the config file option, but for an one time or sporadic use, the command line option is better IMHO.

lamnguyenx · a year ago
Nice catch. You're right. At my company all servers operate inside a complex & heavily-guarded intranet, so I usually use 0.0.0.0 instead of localhost / 127.0.0.1. Sometimes, only using the former worked (e.g: using Code-Server or Jupyter Notebook), and I'm not so good at networking to dive into iptables and firewall things.
lamnguyenx commented on Visual guide to SSH tunneling and port forwarding (2023)   ittavern.com/visual-guide... · Posted by u/todsacerdoti
mmh0000 · a year ago
While we're sharing neat ssh_config tricks, here's my favorite trick I use:

My home network is set up so that if I'm home or on my self-hosted VPN, I can SSH directly to my various things. But if I'm away from home and not on the VPN, I can SSH into my home systems through a jump host.

In the ssh_config file, I have it configured to detect how/where I am and optionally use a jump host.

  Host jump jump.example.org
    HostName                        jump.example.org
    Port                            41444
    User                            mmh
    UserKnownHostsFile              /dev/null
    ChallengeResponseAuthentication no
    CheckHostIP                     no
    Compression                     yes
    ForwardX11                      no
    GSSAPIAuthentication            no
    LogLevel                        ERROR
    PreferredAuthentications        publickey,keyboard-interactive
    ProxyJump                       none
    PermitLocalCommand              yes

  # Order here matters. Detect VPN first, then home network.
  # If connecting to a *.example.org host and router.example.org = 10.0.0.1, must be home/vpn.
  Match host *.example.org exec "getent ahosts router.example.org | grep -q ^10.0.0.1"
    ProxyJump                 none
  # If connecting to a *.example.org host and the macaddr of 10.0.0.1 is NOT 2a:70:ff:ff:ff:ff, then use jump.example.org:
  Match host *.example.org exec "! arp -ne 10.0.0.1 | grep -Fq 2a:70:ff:ff:ff:ff"
    ProxyJump                 jump.example.org


  ## Define the things
  Host tv tv.example.org
    HostName                  tv.example.org
    User                      mmh

lamnguyenx · a year ago
Wow. Nice trick! I didn't know SSH Config can do that exec control flow.
lamnguyenx commented on Visual guide to SSH tunneling and port forwarding (2023)   ittavern.com/visual-guide... · Posted by u/todsacerdoti
theideaofcoffee · a year ago
The filthiest SSH tunneling hack that I've ever done was at 3AM while in a three-way... datacenter connection. The interesting part of that, while the three facilities, spaced out over a single metro area had upstream transit connectivity to the rest of the net, only two pairs were able to reach the other due to some odd routing policies that weren't able to be resolved in time.

That meant that A could connect to B, and only B could connect to C. The data I had to move from facility A to facility C via B in the most ridiculous rsync+ssh tunnel+keys+routing shenanigan mashup I've ever done. It took a few tries to get the incantation exactly right, but it was magical seeing it all move as one.

Looking back it is super obvious how I'd do it now, but back then being green, was a huge accomplishment. I still remember the exhilaration when I confirmed everything was synced up.

lamnguyenx · a year ago
just check my comment in in this post using `~/.ssh/config` with ProxyJump, you can virtually jump between A B C D E ... or whatever.
lamnguyenx commented on Visual guide to SSH tunneling and port forwarding (2023)   ittavern.com/visual-guide... · Posted by u/todsacerdoti
lamnguyenx · a year ago
It's 2024! Please avoid writing SSH commands like that.

Instead, configure your ~/.ssh/config with LocalForward, RemoteForward, and ProxyJump. This can save you a significant amount of time, especially when using ssh, scp, or rsync to transfer data from a remote server that requires multiple intermediate SSH connections.

e.g:

    Host jump-host-1
        HostName jump1.example.com
        User your_username
        IdentityFile ~/.ssh/id_rsa

        Host jump-host-2
            HostName jump2.example.com
            User your_username
            IdentityFile ~/.ssh/id_rsa
            ProxyJump jump-host-1

            Host jump-host-3
                HostName jump3.example.com
                User your_username
                IdentityFile ~/.ssh/id_rsa
                ProxyJump jump-host-2

                Host target-server
                    HostName target.example.com
                    User your_username
                    IdentityFile ~/.ssh/id_rsa
                    ProxyJump jump-host-3
                    LocalForward 0.0.0.0:8080 0.0.0.0:80  
                    RemoteForward 0.0.0.0:9022 0.0.0.0:22

    # after this:
    # - you can ssh/scp/rsync to your target-server via an alias
    # - forward traffic FROM port 80 on your target-server to port 8080 on your local machine
    # - forward ssh requests TO port 9022 on your target-server to port 22 on your local machine
    # - remember, for LocalForward & RemoteForward : 
    #   + left is target-server
    #   + right is your local
    #   + use 0.0.0.0 instead of localhost or 127.0.0.1

lamnguyenx commented on Ask HN: What macOS apps/programs do you use daily and recommend?    · Posted by u/0bsolete
Perceval · 2 years ago
I will second IINA. It's not the swiss army knife that VLC is, but it seems to stream videos from a NAS with better/smoother performance than VLC, and its interface is more mac-native.
lamnguyenx · 2 years ago
Don't forget full HDR support of IINA that VLC and most other alternatives on Apple Silicon don't have.

However, VLC still provides the best subtitle style customizations.

u/lamnguyenx

KarmaCake day37June 10, 2024View Original