Skip to content

Instantly share code, notes, and snippets.

View rm77's full-sized avatar
💭
(to be) or not (to be) = (to be)

Roy rm77

💭
(to be) or not (to be) = (to be)
  • surabaya, indonesia
View GitHub Profile
@rm77
rm77 / multi-gpu.sh
Created March 17, 2025 13:29 — forked from morgangiraud/multi-gpu.sh
Script for Ubuntu: Nvidia Multi-GPU Installation and Testing
# Script for Ubuntu: Nvidia Multi-GPU Installation and Testing (Adaptable for other distros)
# Step 0: Clean Nvidia Installation
# If you need to completely remove a previous Nvidia installation, use these commands.
# This ensures that you start with a clean slate for a new installation.
sudo apt-get --purge remove "*nvidia*"
sudo apt-get --purge remove "*cuda*" "*cudnn*" "*cublas*" "*cufft*" "*cufile*" "*curand*" "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*" "*libnccl*"
# Verify that the removal is complete by checking if any Nvidia, CUDA, or cuDNN packages are still installed.
apt list --installed | grep cuda
@rm77
rm77 / init.sh
Created February 19, 2025 15:34 — forked from m13253/init.sh
Minimal working initramfs for BusyBox, with login
#!/bin/busybox sh
# 1) Download a prebuilt BusyBox binary here:
# https://busybox.net/downloads/binaries/
#
# 2) Prepare your kernel
# cp /boot/vmlinuz vmlinuz
#
# 3) Copy the files
# install -Dm0755 busybox-x86_64 initramfs/bin/busybox
@rm77
rm77 / curl.md
Created February 7, 2025 03:55 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@rm77
rm77 / An Ubuntu WiFi Secure Captive Portal.md
Created January 9, 2025 01:24 — forked from theprojectsomething/An Ubuntu WiFi Secure Captive Portal.md
Guide: An Ubuntu WiFi Secure Captive Portal: Network Manager / DNSMasq / HA Proxy / Let's Encrypt

An Ubuntu WiFi Secure Captive Portal

Improvements, suggestions & fixes are welcome!

Captive portals can be a pain. Here's an opinionated and no-doubt entirely imperfect guide to setting one up for a WiFi access point on Ubuntu (tested on 20+), utilising Network Manager, DNSMasq, HA Proxy and (optionally) Let's Encrypt for a secure, locally hosted landing page.

_Note: This setup was originally designed for an offline WLAN, providing access to a small number of locally hosted domains ... think the WiFi media portal on a flight or boat. If you are looking to provide internet access behind a captive portal then this guide won't get you all the way there. That said, many routers have this capability built in, as do any number of open source router firmware solutions. So you probably don't need to roll your own. If you'd like to try anyway, Ha Proxy Stick Tables would probably come in handy. Very happy to update the guide with any p

@rm77
rm77 / readme.md
Created December 11, 2024 06:53 — forked from labseven/readme.md
Linux USRP install instructions

Installation:

`

sudo add-apt-repository ppa:ettusresearch/uhd

sudo apt-get update

sudo apt-get install libuhd-dev libuhd003 uhd-host gnuradio

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDtizbKumP5x0Z4/hTMYEdDLJbeV/GX8rL6RzGxKlwyGDR+hxvxdZjK4Fp3EIpk4HzT2huEVBeboENSYfs9ypOVKTjn7do9Jkf6HZ1EJ9lCxEB1UzDadHbEYk/Pqmh0mI2xLDzVWnF+5bcDq9MURb6SSoEzANI4MmpqdjNd1meSVTSjCZkg99QW6niyiKfPXlr66751KS7W7c924+6jY3tLD7M0ljcqO5EIj6GZGoGDSObcGJA8t0U0FnnKye+04e6U59uLKStNHilGAsN4Y/V4fiTyiz1mS4EBcyiEI8K2nEYYeYiFXroTAi5vtE9SrdBiJLN2sLOxzqW24dSe+DxIMT2KXyTUZ9hHnl07QGqjK3U76co0BTGc66J9fBzmP+gzXmcmfxBo2laP5tDDY55ZK7sGMla5ZvLaFK5LsKxDnHMHuxxRL4onfwGKHXXffgQNAUsH1mzPMOZJ6/aF+7oY5WUEX6GgJyKRVnQE9pgOJw1iZrGw2PJK5iJMIyTuyjU= royyana@B014-LIFEBOOK-U536
@rm77
rm77 / networking_datasets.md
Created May 8, 2024 11:49 — forked from stefanbschneider/networking_datasets.md
List of datasets related to networking. Useful for data-driven evaluation or machine learning approaches. Feel free to comment with updates.
@rm77
rm77 / roy_at_its.ac.id.asc.pgp
Created May 8, 2024 06:13
roy_at_its.ac.id.asc.pgp
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGY66t8BDAD1/izxxLB1p1cIsb+jbLqqsHApwyUiM42OD3mqQ6Jack+r/hqQ
f6qZtTpTIq1sLdcw1isnlzFjRuqo80kSr9JdQkS2VziaeDyo7gXFiGIh3w41ApCq
vTE3kstDMXklSQHFqEPk5ZFHNgekE6Kx+cnUrwy636N4A1fTOyV409nSXaPoidMM
ZASSFeRaBCCq5q0lpNHONqY9/MUPLxW4E8qWCYsslGP4qigJs5EQXVwJaaPw1jkw
2cHY0EU255rGFHGBzMeFGZ0gDoB8k4Tl14jHphfhqGQmcW9OyfWJK4u+KkoFXAA7
sOZWg5Tti/s43Fjc8asWiUPGzRmZhNfmRTEqiu6STGfyb6DzIuRs2HU7nSaoujLs
lWLFzPJJOPRcERQba8PZWx9O95iC3ScJIomEfQBoT3LzCSbL4edMLeuurD/IbtSJ
TjBZvuhkWWJxJxpyWQPwkL8RN3pBnpqbCLBa2hW7P5jr4xrTmyWs4a1BoJbw33Ko
@rm77
rm77 / mk-vxlan.sh
Created April 22, 2024 06:38 — forked from djoreilly/mk-vxlan.sh
Linux VxLAN performance test setup script
#!/bin/bash
set -xe
# $0 host dev remote_ip
# host is 1 or 2
# on vmA
# ./mk-vx.sh 1 ens3 10.10.10.9
# on vmB
# ./mk-vx.sh 2 ens3 10.10.10.15
@rm77
rm77 / ipint.go
Created April 20, 2024 12:51 — forked from ammario/ipint.go
Golang IP <-> int conversion
func ip2int(ip net.IP) uint32 {
if len(ip) == 16 {
return binary.BigEndian.Uint32(ip[12:16])
}
return binary.BigEndian.Uint32(ip)
}
func int2ip(nn uint32) net.IP {
ip := make(net.IP, 4)
binary.BigEndian.PutUint32(ip, nn)