Skip to content

Instantly share code, notes, and snippets.

View bryantee's full-sized avatar

Bryan Swagerty bryantee

View GitHub Profile

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@bryantee
bryantee / FizzBuzz refactor functions.markdown
Created June 5, 2015 20:50
FizzBuzz refactor functions
$(document).ready(function() {
var DEBUG_MODE = true;
// Question class constructor
var Question = function (questionNumber, question, answer1, answer2, answer3, answer4, correctAnswer) {
this.questionNumber = questionNumber;
this.question = question;
this.answers = [answer1, answer2, answer3, answer4];
$(function(){
$('#query').submit(function(event) {
event.preventDefault();
var searchTerm = $('#search-term').val();
var searchQuery = 'http://www.omdbapi.com/?s=' + searchTerm + 'r=json';
console.log('Using query :' + searchQuery);
$.getJSON(searchQuery, function(data) {
showResults(data.Search);
});
@bryantee
bryantee / projects-list.md
Last active September 4, 2016 20:09
Summary of Projects Completed for Thinkful.com and Links
@bryantee
bryantee / scope.md
Created September 14, 2016 23:52
Questions & Answers: Scope and the Problems with Globals

Scope is the set of rules that apply to JavaScript variables regarding how they are declared and accessed. There are two kind of scope: Global scope and Function Scope or Local Scope. The preferred way to declare a variable in Javascript is using the keyword var which keeps the variable from polluting the global scope. A function scope variable is declared in the function and not acccessible to any 'parent scope.' Failing to use var during declaration can lead to unintended consesquences. It can cause bugs and make things more difficult to debug and collaborate on. For instance, a function should, given a set of inputs, always have the same output (a pure function). But this is not necessarily the case when variables cannot be consistently refrenced to (like with multiple functions using a global variable). To get around this, it is wise to use 'strict mode' to prevent your code from compiling if there are any variables not using var.

Hoisting refers to how the JavaScript compiler looks up de

@bryantee
bryantee / 9-18-16.md
Last active September 20, 2016 13:49
Week of 9-18-16 Mentor Session Questions
@bryantee
bryantee / session.md
Last active September 25, 2016 18:26

Mentor session Friday 9-23

API Capstone Ideas

  • Find / listen to Local bands
  • Has parameter for location