Skip to content

Instantly share code, notes, and snippets.

View aadityabhatia's full-sized avatar

Sonny Bhatia aadityabhatia

View GitHub Profile
@lunitrixx
lunitrixx / install.sh
Created August 16, 2023 10:58 — forked from ikr4-m/install.sh
Hyper-V Enhanced Session for Debian
#!/bin/sh
# This script based on linux-vm-tools for Ubuntu 22.02.
# Thanks to https://github.com/Hinara/linux-vm-tools/ to script
# This script is for Ubuntu 22.04 Jammy Jellyfish to download and install XRDP+XORGXRDP via
# source.
#
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips.
#
@nealfennimore
nealfennimore / wireguard.conf
Last active January 29, 2025 10:57
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@sowbug
sowbug / gist:c7f83140581fbe3e6a9b3ddf24891e77
Last active January 25, 2023 09:22
Making an encrypted DVD image
# All the code from http://billauer.co.il/blog/2010/10/encrypted-iso-dvd-luks-dm-crypt-fedora-linux/
MB_COUNT=100
VOL_NAME=MyVolName
DIR_TO_COPY=/tmp/mydir
# Make a 100MB disk image
dd if=/dev/zero of=disk.img bs=1M count=$MB_COUNT
# become root
@craigbeck
craigbeck / cv-axle-replacement.md
Created June 10, 2017 21:03
Lexus GX470/4Runner CV axle replacement

Tools 1 21mm socket 1 19mm socket 1 17mm socket 1 35mm socket 1 10mm hex head socket BFH (big effing hammer) Also a rubber mallet is a plus...or just hit the old axle with the big one as it's coming out anyways. 1 short prybar (12 inches) 1 long prybar (36 inches)

@craigbeck
craigbeck / gx470-resources.md
Last active September 25, 2021 14:50
Lexus GX470 notes
//Now with less jquery
//1) go to your my-list page, and scroll to the bottom to make sure it's all loaded:
//http://www.netflix.com/browse/my-list
//2) Next, paste this in your developer tools console and hit enter:
[...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label'))
//or use this to copy the list to your clipboard:
copy([...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label')))
@strike
strike / mytelnet
Last active April 10, 2017 14:02
telnetpass - noninteractive ssh password provider (primitive sshpass for telnet)
#!/bin/bash
ip=`gethostip -d "$1"`
echo $ip
read -p "Which user-pass use? (G - GUU, M - marina or nothing) " prompt
case $prompt in
[Gg])
telnetpass "$ip" login pass en
;;
[Mm])
@plepe
plepe / gist:52ecc9f18efb32c68d18
Last active April 3, 2025 19:15
MDADM and LVM cheat sheet

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0