Skip to content

Instantly share code, notes, and snippets.

View cmccormack's full-sized avatar
🔍
Code Reviews

Christopher McCormack cmccormack

🔍
Code Reviews
View GitHub Profile
@cmccormack
cmccormack / 0-fork_and_clone.md
Last active March 27, 2019 10:45
Updating a PR branch with upstream

Fork and Clone the freeCodeCamp Repository

Fork the freeCodeCamp repository

  1. Go to the freeCodeCamp repository on GitHub: https://github.com/freeCodeCamp/freeCodeCamp
  2. Click the "Fork" Button in the upper right hand corner of the interface.
  3. After the repository has been forked, you will be taken to your copy of the freeCodeCamp at https://github.com/YOUR_USER_NAME/freeCodeCamp

Clone your fork locally

@cmccormack
cmccormack / blm.md
Created June 16, 2020 02:30
blm-main

Rename master to main and update remote while setting new upstream

git branch -m master main && git push -u origin main

Make your main branch on Github the default: Settings > Branches > Default Branch

Delete remote master branch

Setup new Ubuntu 20.04.4LTS deployment with customizations

Initial Setup

Proceed through the initial configuration, entering username and password.

Update packages:

sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get dist-upgrade
@cmccormack
cmccormack / chromesearchmultvar.js
Last active December 9, 2022 21:44
Google Chrome Search Engine with multiple search strings
/**
* @desc this snippet will allow multiple arguments to a search query in Google Chrome
* examples include https://www.reddit.com/r/%s/search?q=%s
* @author Chris McCormack mccormack.christopher@gmail.com
* @required Google Chrome. Replace all values in brackets ([]) with valid entries.
* To add to Chrome, go to Settings > Search [Manage search engines...] > Other search engines.
* At the bottom of this section, there are three required fields:
* [Add a new search engine] [Keyword] [URL with %s in place of query]
* - Add a new search engine: Descriptive name of your search
* - Keyword: used to trigger search.
@cmccormack
cmccormack / linux_networking.sh
Last active January 23, 2023 21:48
Linux Networking Commands
# View device IP Address(es)
ip -o address show [interface] | awk '{print $4}' # Prints the IP address(es) of a single interface
ip address # Displays all interfaces
ifconfig # (deprecated)
hostname -I # Displays only IP addresses
# DNS name and resolution
host
dig
/etc/hosts # Add manual DNS record to hostname mappings (normally checked before configured DNS server(s))