Skip to content

Instantly share code, notes, and snippets.

View mjamesd's full-sized avatar
💭
working 💉, studying 📚, parenting👶

Mark Drummond mjamesd

💭
working 💉, studying 📚, parenting👶
View GitHub Profile
@mjamesd
mjamesd / Custom Domains with GitHub Pages & Heroku.md
Last active February 4, 2022 06:02
Custom Domains with GitHub Pages & Heroku

Custom Domains with GitHub Pages & Heroku

Summary

For just a few dollars, you can purchase your own domain name for 1 year from a domain registrar. These companies register your domain name with ICANN and add it to the global network of Domain Name Service (DNS) servers. These servers match IP addresses to domain names, so that when a user types your domain name into their browser, they are automagically connected to your domain's IP address.

Many domain registrars also offer web hosting... for a monthly or yearly fee. These fees can be a barrier to entry into markets. If you don't have very much traffic on your site (i.e., you're just starting your company, you are a hobbyist, you are a developer) you can use free hosting sites and then point your domain's DNS records to these sites. In this tutorial, I'll be explaining how to set up GitHub Pages and Heroku with your domain's DNS so that you can quickly host your website and

@mjamesd
mjamesd / RegEx for IPv4 Address.md
Last active January 27, 2022 08:03
Regex Tutorial for IPv4 Addresses in JavaScript

Extracting an IPv4 Address From a String

Regular Expressions ("regex" or "regexp") are a common way for web developers to use JavaScript to find specific patterns of characters -- letters, numbers, punctuation, special characters, and even whitespace such as spaces, tabs, and new lines. In this tutorial we will look at one such regex that will find an IPv4 address in a string in JavaScript.

Summary

When sifting through access and error logs, it's often useful to find the IP address in a string. Other times, you will want the user to enter this information into a form. You may also want to scrape a webpage to find any IP addresses contained within.

IPv4 address are four sets of numbers ranging from 0-255 separated by a period ("."). Any or all of the four numbers can be zero. They can have leading zeros followed by other numbers ("012" or even "000"). In this tutorial I also want to be able to pluck an IP address out of a larger body of text, such as an entry in an error log or the HTML of a webpage.

@mjamesd
mjamesd / Excel - Reference table column from another workbook.txt
Last active January 15, 2022 01:18
Microsoft Excel: Reference a named table's column from another workbook
I couldn't find this answer via an Internet search so I am adding it here.
Trivial case:
-TableA is in Workbook1.xlsx and has three columns: ID, Name, Date
-TableB is in Workbook2.xlsx and has two columns: Name, FavFood
-User wants to combine the tables on the Name column and include ID, Name, Date, and FavFood.
1. Add a column to Table A and label it FavFood.
2. In the first cell of the new FavFood column, type this forumal:
=INDEX(Workbook2.xlsx!TableB[FavFood], MATCH([@Name], Workbook2.xlsx!TableB[Name],0))