Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel S. Sterling eqhmcow

View GitHub Profile
@zoilomora
zoilomora / README.md
Last active Dec 5, 2022
How to disable systemd-resolved in Ubuntu
View README.md

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@eqhmcow
eqhmcow / unzip.pl
Last active Sep 27, 2020
Perl unzip example with IO::Uncompress::Unzip
View unzip.pl
#!/usr/bin/perl
# example perl code, but this should now actually work properly, even on
# Windows
# thanks to everyone who tested this, reported bugs and suggested or
# implemented fixes!
# this code is licensed under GPL 2 and/or Artistic license;
# aka free perl software
@matthewmcvickar
matthewmcvickar / .bash_prompt
Last active May 11, 2020
Get the current phase of the moon and use it to print an emoji moon phase image. OS X only, requires some shell knowledge. (Emoji moon phases will not show up here, but they will when you copy and paste or download the file.)
View .bash_prompt
# Get the current phase of the moon for use as prompt
# Adapted from: http://wan.pengganas.net/entry/calculating-phase-of-moon-in-ruby
function moonphase() {
/usr/bin/env ruby <<-EORUBY
# Convert a date to Julian.
def julian(year, month, day)
a = (14-month)/12
y = year+4800-a
m = (12*a)-3+month