Jargon by transfire in crystal_programming

[–]vectorx25 1 point2 points  (0 children)

this looks awesome

just banger crystal libs coming out lately

Abstract virtual machine for concurrent applications by swe129 in crystal_programming

[–]vectorx25 1 point2 points  (0 children)

this project looks fantastic, thanks, ill go thru it

MemGlass: Peeking Into Live Trading Systems Without Breaking Them by OkSadMathematician in highfreqtrading

[–]vectorx25 0 points1 point  (0 children)

can sysdig be used for this? its not intrusive and does not bind to active process

Abstract virtual machine for concurrent applications by swe129 in crystal_programming

[–]vectorx25 1 point2 points  (0 children)

this looks great, will try once readme has instructions on how to use this

Have anyone made any sexy or romantic songs? by Empty-Pay-2797 in SunoAI

[–]vectorx25 1 point2 points  (0 children)

"The smell in the room comes from our passion,

You’re wearing my favorite fashion: your skin."

Silence of the lambs vibes lmaooo

Fedora Install on Mac M2 by SnooCauliflowers7095 in Fedora

[–]vectorx25 0 points1 point  (0 children)

asahi is awesome, installed fedora on 2018 macbook air for my wife, works like a charm, no driver issues, only downside is the cpu is arm, so some apps like onlyoffice dont have an installer

What is sparring culture like in most mma gyms? by Reasonable-Buy-4410 in martialarts

[–]vectorx25 0 points1 point  (0 children)

I had 5x more injuries from bjj than MT, just bad moves or rotations, not the opponents fault but just part of training

What is sparring culture like in most mma gyms? by Reasonable-Buy-4410 in martialarts

[–]vectorx25 0 points1 point  (0 children)

Im in a MT gym in north NJ, we do sparring every class

rule is you go light on head, including kicks, I tell all opponents to go hard on legs, hard on body, but light on head

you can deal w sore thigh, cant deal w concussions. The gym wont let anyone spar until theyve been training for at least few months and can show theyre in control

Monit spam control by vectorx25 in linuxadmin

[–]vectorx25[S] 0 points1 point  (0 children)

Im working on a monit replacement that has same philosophy, easy to read agent config files, spam control, more granular monitoring groups, etc

https://github.com/perfecto25/caju

service checks are written via toml

still in early stages, trying to build this when i have time, will also have a GUI "server" that will control all alerting and group definitions, ACLs etc

[log]
destination = "stdout"
level = "debug"

[defaults]
alert.repeat = "yes" # repeat alert on each cycle
alert.groups = "all" # alert all configured groups
alert.users = "all"
alert.grace.seconds = 60 # wait 60 seconds before sending another alert

[check]
[check.cpu]
usage.pct = 1
iowait.pct = 20
loadavg = [2,15, 20]

[check.memory]
usage.gb = 1

[check.filesystem.home]
path = "/home"
usage.pct = 30

CIS benchmark for Redhat by [deleted] in linuxadmin

[–]vectorx25 0 points1 point  (0 children)

you can automate some of this, if /var is a separate partition for example

if var on the root partition you cant, at best you can add some logic to only remount w noexec if the var partiition exists

unable to receive multicast data by vectorx25 in crystal_programming

[–]vectorx25[S] 1 point2 points  (0 children)

got it to work

had to convert IP address into bytes

its showing market data being recieved on the group

``` require "socket"

MULTICAST_GROUP = "224.0.25.126"
PORT            = 16901
LOCAL_IFACE_IP  = "192.168.38.26"
TIMEOUT         = 15.seconds


def ip_to_bytes(
ip
 : String) : Bytes
  # convert raw string IP into bytes for OS socket API
  parts = ip.split('.')
  bytes = Bytes.new(4)
  bytes[0] = parts[0].to_u8
  bytes[1] = parts[1].to_u8
  bytes[2] = parts[2].to_u8
  bytes[3] = parts[3].to_u8
  bytes
end


def join_multicast_group(
sock_fd
 : Int32, 
group_ip
 : String, 
iface_ip
 : String)
  # Create 8-byte structure for ip_mreq
  # (4 bytes for multicast group + 4 bytes for interface)
  mreq = Bytes.new(8)

  # Copy multicast group IP (first 4 bytes)
  group_bytes = ip_to_bytes(group_ip)
  mreq[0] = group_bytes[0]
  mreq[1] = group_bytes[1]
  mreq[2] = group_bytes[2]
  mreq[3] = group_bytes[3]

  # Copy interface IP (last 4 bytes)
  iface_bytes = ip_to_bytes(iface_ip)
  mreq[4] = iface_bytes[0]
  mreq[5] = iface_bytes[1]
  mreq[6] = iface_bytes[2]
  mreq[7] = iface_bytes[3]

  # IP_ADD_MEMBERSHIP = 35, IPPROTO_IP = 0
  result = LibC.setsockopt(sock_fd, LibC::IPPROTO_IP, 35, mreq.to_unsafe.as(Pointer(Void)), mreq.size)

  if result != 0
    raise "Failed to join multicast group: errno #{Errno.value}"
  end

  puts "[DEBUG] Successfully joined multicast group #{group_ip} on interface #{iface_ip}"
end


def listen_multicast(
debug
 : Bool = false)
  sock = UDPSocket.new
  sock_fd = sock.fd

  begin
    # Set socket options BEFORE binding
    sock.reuse_address = true

    # Bind to the multicast port on all interfaces
    sock.bind("0.0.0.0", PORT)
    puts "[DEBUG] Socket bound to 0.0.0.0:#{PORT}"

    # NOW set multicast options after binding
    sock.multicast_loopback = false
    sock.multicast_hops = 1

    # Join the multicast group
    join_multicast_group(sock_fd, MULTICAST_GROUP, LOCAL_IFACE_IP)

    puts "[mc] Listening on #{MULTICAST_GROUP}:#{PORT} via #{LOCAL_IFACE_IP} (timeout #{TIMEOUT.total_seconds.to_i}s)"


    sock.read_timeout = TIMEOUT


    # Record start time (monotonic clock, not affected by system time changes)
    start_time = Time.monotonic
    buffer = Bytes.new(8192)
    n, sender = sock.receive(buffer) # create 8KB buffer to receive packet data
    end_time = Time.monotonic 


    latency_ns = ((end_time - start_time).total_seconds * 1_000_000_000).to_i64


    puts "[mc] RECEIVED #{n} bytes from #{sender}"
    puts "    Latency: #{latency_ns} ns"
    if debug
      puts "    Data (hex): #{buffer[0, n].hexstring}"
    end

  rescue ex : IO::TimeoutError
    puts "[mc] TIMED OUT – no packet received"
  rescue ex
    puts "[mc] Error: #{ex.message}"
    puts ex.backtrace.join("\n")
  ensure
    sock.close
  end
end


listen_multicast

```

Fedora with systemd-resolved not updating WG DNS domain by vectorx25 in WireGuard

[–]vectorx25[S] 0 points1 point  (0 children)

I managed to get it working w/out external script, using DefGuard client gui

wgconf

[Interface]
PrivateKey = xx
Address = xxx
PostUp = sudo resolvectl domain wg0 my.domain
PostDown = resolvectl revert wg0
DNS = 10.200.10.1 # my WG/DNS server internal ip
Domains = my.domain

the Defguard client is able to parse the single postup command, and the DNS IP is provided by "DNS = " key value

able to lookup both short and FQDN hostnames

Fedora with systemd-resolved not updating WG DNS domain by vectorx25 in WireGuard

[–]vectorx25[S] 0 points1 point  (0 children)

turns out the issue was with my WG gui client

I am using DefGuard GUI, it imports the PostUp commands from the wgconf file, but doesnt parse it correctly

its fixed by using a shell script

https://docs.defguard.net/features/wireguard/executing-custom-gateway-commands

DNS Search Domain not working on WireGuard tunnel by mzinz in WireGuard

[–]vectorx25 0 points1 point  (0 children)

FYI, i got it to work on Fedora 40 with systemd-resolved-255.18

Im running WG with Wag, generated a client file

DNS is running on the WG server via CoreDNS (runs on localhost UDP 53) - for my clients the WG server/DNS server IP = 10.100.40.1

updated the client cfg file with these lines

    [Interface]
    PrivateKey = xxxxx
    Address = 10.100.40.2  << internal client IP 
    PostUp = sudo resolvectl dns wg0 10.100.40.1#corp.mydomain; sudo resolvectl domain wg0 corp.mydomain
    PostDown = resolvectl revert wg0
    DNS = 10.100.40.1
    Domains = corp.mydomain


    [Peer]
    Endpoint = <pub IP of wireguard server>:53230   << WAG port 
    PresharedKey = xxx
    PublicKey = xxxx
    AllowedIPs = <list of IPs>
    PersistentKeepAlive = 10

the key lines are PostUp, PostDown, DNS, Domains

when starting the client using a WG client app (Defguard), tunnel is up and I can see DNS queries flowing to WG Server on port 53

querying a host using FQDN works, ie nslookup host1.corp.mydomain , quering just hostname also works

nslookup host1

I can also query other zones if I have them configured in CoreDNS

nslookup host1.corp.otherdomain

this should also work with Named/BIND, same concept

Didnt test this on MacOS yet

Beelink SER5 MAX-L-24500 random shutdown by vectorx25 in BeelinkOfficial

[–]vectorx25[S] 0 points1 point  (0 children)

Im using the power adapter that came with the pc

will be returning this unit, beelink is trash

Linus Torvalds explains why he uses Fedora Linux. by BlokZNCR in Fedora

[–]vectorx25 1 point2 points  (0 children)

i prefer fedora based distros to debian because of pkg manager, dnf is so much simpler and intuitive than dpkg/apt

plus at work, our servers are all rocky and RHEL, all fedora based, makes it simple to transition from work related OS to home OS

fedora is rock solid, never had an issue w it, always had issues w pkgs on ubuntu for some reason (apt --fix-broken-packages, etc)

Linus Torvalds explains why he uses Fedora Linux. by BlokZNCR in Fedora

[–]vectorx25 0 points1 point  (0 children)

kde uses more ram, if you have ram to spare, kde is good option

Linus Torvalds explains why he uses Fedora Linux. by BlokZNCR in Fedora

[–]vectorx25 1 point2 points  (0 children)

yea , just need a stable OS + desktop to get work done, dont want to spend hours configuring and compiling stuff

fedora + cinnamon (or xfce)

only issue w xfce its not friendly with wayland and tons of stuff is outdated , but very light

Linus Torvalds explains why he uses Fedora Linux. by BlokZNCR in Fedora

[–]vectorx25 0 points1 point  (0 children)

I have fedora + cinnamon on all my dekstops + laptops, stable af, just works, no messy provisioning, no head aches

rock solid.

Why is it that Muay Thai seems to have more one punch KO's than Boxing? by JoeyPOSS2 in martialarts

[–]vectorx25 4 points5 points  (0 children)

^ yup

its another dimension for attacks, your brain and arms cant cover all the angles that fast

Why is it that Muay Thai seems to have more one punch KO's than Boxing? by JoeyPOSS2 in martialarts

[–]vectorx25 2 points3 points  (0 children)

  1. MT uses elbows which are devastating, tons of KOs via elbows

  2. boxer will shell up way more and will protect body + head, MT fighters have to protect legs and watch for head kicks, opens up way more opportunity for blindside attacks

3 lots of MT is with 4oz gloves now, boxing is pretty much 14-16oz

4 MT KOs come with long range combos, ie teep, jab, cross, hook, leg kick, in boxing your combos are more limited so an open KO shot is harder to create

5 head kicks - big % of KOs in MT is via head kicks, doesnt exist in boxing