Skip to content

Instantly share code, notes, and snippets.

How to debug Pintos from VSCode over Remote-SSH

Prerequisites

  • Virtual Machine setup with Pintos and gdb.
  • You should already understand how to run Pintos and attach gdb inside the VM (without using VSCode).
  • VSCode configured to connect to your Virtual Machine over Remote-SSH. If you are typing the password every time you connect, check out Remote-SSH Pro Tip below.
  • These instructions are tested on a M1 Mac connected to an Ubuntu 22.04 VM.

Instructions

@benhunter
benhunter / airplane_tracker.py
Created December 20, 2022 18:21
Check a list of airplane registration numbers and email when a flight is found. Uses RapidAPI and Gmail smtp.
# Check a list of airplane registration numbers and email when a flight is found.
# List regisration numbers in registration_numbers.txt
# Update RapidAPI key.
# Update gmail credentials.
import re
import http.client
import smtplib
# open the text file and read the registration numbers into a list
with open("registration_numbers.txt", "r") as f:
#!/bin/bash
# Update systems using apt package manager. Ubuntu, Kali.
# prompt for sudo if not already root
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
sudo "$0" "$@"
exit
fi
echo "Updating..."
@benhunter
benhunter / geodesy_regex.py
Created December 30, 2019 08:59 — forked from cgudea/geodesy_regex.py
regular expressions for verifying common coordinate systems
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
@benhunter
benhunter / SimpleHTTPFileServer.py
Last active October 8, 2018 13:12
HTTP File Server for Upload and Download. Python 3.
#!/usr/bin/env python
"""Simple HTTP Server With Upload, Python 3
08 October, 2018
https://gist.github.com/benhunter/8d25983c40016346bbe1fad222b6749c
Original (python 2) credit to UniIsland:
https://gist.github.com/UniIsland/3346170
This module builds on BaseHTTPServer by implementing the standard GET
@benhunter
benhunter / cdp.py
Created February 28, 2018 16:32 — forked from trhura/cdp.py
A small python script for cdp device discovery
#! /usr/bin/env python
# A small script for cdp devices discovery
import sys
import pcapy
import socket
from dpkt import ethernet
from dpkt import cdp
from docopt import docopt
import math
import random
# RSA implementation in python.
# reference: http://doctrina.org/How-RSA-Works-With-Examples.html
# code: https://github.com/mgermino/RSA/blob/master/RSA.py
def primeGen(maxnum):
#sieve of eratosthenes prime generator
yield 2