Skip to content

Instantly share code, notes, and snippets.

View brianjeremy's full-sized avatar

Brian Jeremy brianjeremy

View GitHub Profile
@brianjeremy
brianjeremy / gist:1875498b306d086a20c7036f5846af21
Created July 31, 2019 19:39
Thinkful JS: Iterating through objects
https://repl.it/@brianjeremy/Enroll-in-summer-school-drill
https://repl.it/@brianjeremy/Make-student-reports-drill
https://repl.it/@brianjeremy/find-by-id-drill
https://repl.it/@brianjeremy/validate-object-keys-drill
https://repl.it/@brianjeremy/Object-creator-drill
https://repl.it/@brianjeremy/Object-updater-drill
https://repl.it/@brianjeremy/Self-reference-drill
https://repl.it/@brianjeremy/Deleting-keys-drill
What is scope? Your explanation should include the idea of global vs. block scope.
Scope defines where variables, functions, and objects are accessible throughout a particular piece of code. Items defined in global scope are accessible anywhere whereas items defined in block scope only exist and are accessible within that specific block of code.
Why are global variables avoided?
Global variables are to be avoided because they are easily forgotten about and thus increase your risk of collision and they are less performant than local variables. Additionally they make code readability more challenging which is not ideal for collaboration,.
Explain JavaScript's strict mode
Javascript strict mode evaluates code with addition restrictions which prompts developers to adopt better coding syntax and practices. Additional errors/exceptions are thrown at runtime which would otherwise go undetected which in turn helps reduce bugs or defects that could go unnoticed.
What are side effects, and what is a pure funct
@brianjeremy
brianjeremy / gist:d306cce1aebabb32ef73e675e5eb8163
Created July 29, 2019 22:19
Thinkful JS: Loops and arrays 10
https://repl.it/@brianjeremy/min-and-max-without-sort-drill
https://repl.it/@brianjeremy/average-drill
https://repl.it/@brianjeremy/fizzbuzz-drill-js
@brianjeremy
brianjeremy / gist:29cd0db8d899d71b5ab402017c0404b5
Last active July 28, 2019 18:03
Thinkful JS: Working with Arrays
Array Basics
https://repl.it/@brianjeremy/Creating-arrays-drill
https://repl.it/@brianjeremy/Adding-array-items-drills
https://repl.it/@brianjeremy/Accessing-array-items-drill
https://repl.it/@brianjeremy/Array-length-and-access-drill
Array Method Drills
https://repl.it/@brianjeremy/Array-copying-I-drill
@brianjeremy
brianjeremy / gist:c858f533f0767741032a9f1dad3823c7
Created July 28, 2019 17:42
Thinkful JS: Application Logic
https://repl.it/@brianjeremy/Traffic-lights-drill
https://repl.it/@brianjeremy/Error-alert-drill
@brianjeremy
brianjeremy / URLs for excercises
Created July 28, 2019 17:31
Thinkful JS: numbers
https://repl.it/@brianjeremy/area-of-a-rectangle-drill
https://repl.it/@brianjeremy/temperature-conversion-drill
https://repl.it/@brianjeremy/Is-divisible-drill
@brianjeremy
brianjeremy / Javascript Strings URLs
Last active July 23, 2019 02:06
Thinkful JS fundamentals: strings
Wiseperson generator: https://repl.it/@brianjeremy/Wiseperson-generator-drill
Shouter: https://repl.it/@brianjeremy/shouter-drill
textNormalizer: https://repl.it/@brianjeremy/text-normalizer-drill
@brianjeremy
brianjeremy / htaccess_with_social_pass_through
Last active February 28, 2020 06:26
Sample .htaccess file that will allow Facebook and Pinterest to bypass authorization so you can keep your site private to the public yet properly test social sharing
# look for Facebot/facebookexternalhit (1.0/1.1)
SetEnvIfNoCase User-Agent .*faceb.* noauth=1
# look for Pinterest (0.1/0.2)
SetEnvIfNoCase User-Agent .*pinterest.* noauth=1
# auth
AuthType Basic
AuthName "PRIVATE"
AuthUserFile /var/www/path-to-your-virtual-host/.htpasswd

Keybase proof

I hereby claim:

  • I am brianjeremy on github.
  • I am brianjeremy (https://keybase.io/brianjeremy) on keybase.
  • I have a public key whose fingerprint is 0C9F 31DE 729D E74F 081A 8CD7 C146 939B 2CD9 F448

To claim this, I am signing this object: