Skip to content

Instantly share code, notes, and snippets.

Code Reviews

Christopher McCormack cmccormack

Code Reviews
Block or report user

Report or block cmccormack

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
cmccormack / 0-image-webpack-loader-dependencies.json
Last active Mar 1, 2019
image-webpack-loader external binaries
View 0-image-webpack-loader-dependencies.json
"imagemin": "^5.3.1",
"imagemin-gifsicle": "^6.0.0",
"imagemin-mozjpeg": "^8.0.0",
"imagemin-optipng": "^6.0.0",
"imagemin-pngquant": "^6.0.0",
"imagemin-svgo": "^7.0.0",
"imagemin-webp": "^5.0.0",
"loader-utils": "^1.1.0",
"object-assign": "^4.1.1",
cmccormack /
Last active Nov 26, 2018
VIM Commands and Tools

Vim - Vi IMproved

Vim is a highly configurable text editor for efficiently creating and changing any kind of text. It is included as "vi" with most UNIX systems and with Apple OS X.

Vim is rock stable and is continuously being developed to become even better. Among its features are:

  • persistent, multi-level undo tree
  • extensive plugin system
  • support for hundreds of programming languages and file formats
cmccormack /
Last active Mar 27, 2019
Updating a PR branch with upstream

Fork and Clone the freeCodeCamp Repository

Fork the freeCodeCamp repository

  1. Go to the freeCodeCamp repository on GitHub:
  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

Clone your fork locally

cmccormack / fake.json
Created Oct 26, 2018
Fake JSON for testing
View fake.json
"url": "",
"forks_url": "",
"commits_url": "",
"id": "53e1780a5a68fe9281cfbbc9820d381f",
"git_pull_url": "",
"git_push_url": "",
"html_url": "",
"files": {
"": {
cmccormack /
Last active Aug 30, 2018
Common Linux commands with examples


The tee utility copies standard input to standard output, making a copy in zero or more files. The output is unbuffered.


echo "I am the very model of a modern Major General" | tee general.txt
I am the very model of a modern Major General # Output
cat general.txt
I am the very model of a modern Major General # Output
cmccormack /
Last active Aug 31, 2018
Notes on Linux Systems

Linux Boot Process

Bootloaders - Starts the OS:

  • LILO - Linux Loader -
  • GRUB - Grand Unified Bootloader
    • Replaced LILO

initrd - initial RAMDisk

  • Temporary filesystem loaded into memory with helpers that can perform hardware detection and loads modules to get the filesystem mounted
cmccormack /
Last active Aug 24, 2018
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
/etc/hosts # Add manual DNS record to hostname mappings (normally checked before configured DNS server(s))
cmccormack / AccurateInterval.js
Created Aug 3, 2018
A more accurate timer to replace setInterval
View AccurateInterval.js
class AccurateInterval {
intervalId = null
constructor(fn, timer) {
this.fn = fn
this.timer = timer
start = () => {
cmccormack / mongoose_examples.js
Created Apr 16, 2018
Mongoose Query and Update Examples
View mongoose_examples.js
// Example of a schema for a Poll document
const PollSchema = new mongoose.Schema({
createdBy: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
createdTime: {
type: String,
required: true
cmccormack /
Last active Mar 3, 2018
Testing Python3 Threading
from threading import Thread, Lock
from random import randint
from time import sleep
class AsyncLetter(Thread):
def __init__(self, letter):
self.timer = randint(1,5)
You can’t perform that action at this time.