Skip to content

Instantly share code, notes, and snippets.

View jenmcquade's full-sized avatar

Jen McQuade jenmcquade

View GitHub Profile
@jenmcquade
jenmcquade / CountryCodes.json
Created January 10, 2024 00:46 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@jenmcquade
jenmcquade / recursive_array.js
Created November 18, 2020 00:44
Recursively flatten an array
/**
Using reduce: https://www.w3schools.com/jsref/jsref_reduce.asp
Using concat: https://www.w3schools.com/jsref/jsref_concat_array.asp
The reduce() method reduces the array to a single value.
The reduce() method executes a provided function for each value of the array (from left-to-right).
The return value of the function is stored in an accumulator (result/total).
@jenmcquade
jenmcquade / console.md
Last active March 12, 2020 19:45
Open VS Code from console to edit Rails credentials YAML file

EDITOR="code --wait" rails credentials:edit

@jenmcquade
jenmcquade / Gemfile
Last active February 29, 2020 21:07
Add Rails Livereload to a project
group :development do
# your dev gems on top
gem 'guard-livereload', '~> 2.5', require: false
gem 'rack-livereload'
end