Skip to content

Instantly share code, notes, and snippets.

View mjhirst's full-sized avatar

Marcus mjhirst

  • United Kingdom
View GitHub Profile
@paulozullu
paulozullu / Fix.MD
Last active February 12, 2025 01:14
DigitalOcean without internet

After almost two weeks since I raised this issue, I was finally able to resolve it. The problem occurred in the first place because different packages got uninstalled somehow when I rebooted. This includes cloud-init, ufw and landscape-common. There is probably more that I haven’t noticed yet. Let’s start with the internet connection, this is how I fixed it:

  • Step 1. I created file “/etc/udev/rules.d/70-persistent-net.rules” and added
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b2:fe:09:35:6e:57", NAME="eth0"

as I mentioned previously. Note that MAC address used above can be found here: “/etc/netplan/50-cloud-init.yaml”

  • Step 2. Run “sudo reboot” and check that eth0 interface persists by running “ifconfig -a”
@ngmaloney
ngmaloney / csvdiff.rb
Created July 22, 2011 17:58
Quick and Dirty delta between 2 csv files
#!/usr/bin/env ruby
#
# A 30 second hack job to compare two CSV files
#
file1 = ARGV[0] ? ARGV[0] : false
file2 = ARGV[1] ? ARGV[1] : false
file1_set = []
file2_set = []
delta = []