Skip to content

Instantly share code, notes, and snippets.

View mcshakes's full-sized avatar

Mac McCarthy mcshakes

View GitHub Profile
Make Student REPORTS:
https://repl.it/@mcshakes/Make-student-reports-drill
Enroll in Summer School:
https://repl.it/@mcshakes/Enroll-in-summer-school-drill
Find By ID:
OBJECT CREATOR
https://repl.it/@mcshakes/Object-creator-drill
OBJECT UPDATER
https://repl.it/@mcshakes/Object-updater-drill
self-REFERENCE
MAX AND MIN (WITHOUT SORT)
https://repl.it/@mcshakes/min-and-max-without-sort-drill
COMPUTE THE AVERAGE
https://repl.it/@mcshakes/average-drill
FIZZBUZZ
ARRAY COPYING I
https://repl.it/@mcshakes/Array-copying-I-drill
ARRAY COPYING II
https://repl.it/@mcshakes/Array-copying-II-drill
SQUARES WITH MAP
CREATING ARRAYS
https://repl.it/@mcshakes/Creating-arrays-drill
ADDING ARRAY ITEMS
https://repl.it/@mcshakes/Creating-arrays-drill
ACCESSING ARRAY ITEMS
TRAFFIC LIGHTS
https://repl.it/@mcshakes/Traffic-lights-drill
HANDLING ERRORS
https://repl.it/@mcshakes/Error-alert-drill
AREA OF RECTANGLE
function computeArea(width, height) {
return width * height;
}
TEMPERATURE CONVERSION
function celsToFahr(celsTemp) {
return celsTemp * (9 / 5) + 32
@mcshakes
mcshakes / String Drills
Created January 7, 2018 23:56
Unit 2 / Lesson 2 / Project 3
function wisePerson(wiseType, whatToSay) {
return `A wise ${wiseType} once said: ${whatToSay}`;
// return 'A wise ' + wiseType + ' once said: "' + whatToSay + '".';
}
SHOUTER
function shouter(whatToShout) {
return whatToShout.toUpperCase();
After npm init and you do all that noise, for setup
  1. npm install --save-dev webpack webpack-dev-server babel-loader babel-core

Note: insert react-hot-loader and react etc, if you are working on React projects

example: npm install --save react react-dom history react-router

  1. touch webpack.config.js and add this boilerplate:
@mcshakes
mcshakes / openssl-errors.md
Last active March 16, 2017 21:11
OpenSSL errors when I run rspec with watir 6.0

Getting these errors after rspec

/Users/EdwardMcCarthy/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin14/openssl.bundle: warning: already initialized constant OpenSSL::VERSION
/Users/EdwardMcCarthy/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin14/openssl.bundle: warning: already initialized constant OpenSSL::OPENSSL_VERSION
/Users/EdwardMcCarthy/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin14/openssl.bundle: warning: already initialized constant OpenSSL::OPENSSL_LIBRARY_VERSION

The fix: