Skip to content

Instantly share code, notes, and snippets.

View nastysloper's full-sized avatar
💭
Climbing Rocks, Running Trails, Writing Code

Richard Vogt nastysloper

💭
Climbing Rocks, Running Trails, Writing Code
  • Accenture Federal Services
  • San Antonio, Texas
View GitHub Profile
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.

Got this tip from the master Myles Byrne (@quackingduck)

git-sh loads your bash config from ~/.bashrc not ~/.bash_profile

So one way to fix this (this is how my machine is set up) is to copy your ~/.bash_profile to ~/.bashrc and then change ~/.bash_profile to just have this line:

test -f ~/.bashrc && source ~/.bashrc

Continuous Integration for Fun and Profit

Continu-what?

Definition: the practice of frequently integrating one's new or changed code with the existing code repository -Wikipedia

Merging new code into master often sounds awesome, but we've been learning the value of testing and the importance of a passing test suite.

But, as your projects grow, your test suite should grow as well. We're all lazy and forget to run the entire test suite everytime we create a new commit. For large projects, running the entire test suite can take hours. So we do what all lazy people do, make a computer do the work for us.

Definitions

General Testing

  • TDD Test Driven Development. Write examples before implementation.
  • BDD Behaviour-Driven Development is about implementing an application by describing its behavior from the perspective of its stakeholders. (The Rspec Book)
  • RSpec (mention alternatives, write a simple hand sewn test)

Testing Terms

/*
* What are the objects in this exercise?
* What are their properties and methods?
* How do your objects interact with their respective DOM elements?
*/
var GroceryList = function () {
this.items = [];
this.totalPrice = 0;
};
GroceryList.prototype.addItem = function (item) {
@nastysloper
nastysloper / zoo.js
Last active December 19, 2015 07:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
// Object constructor
function Animal(){};
// Object literal
var Zoo = {
@nastysloper
nastysloper / index.html
Created July 3, 2013 13:47 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------
@nastysloper
nastysloper / index.html
Last active December 18, 2015 11:19 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
/* Here is your chance to take over Socrates!
$(document).ready(function() {
$('h1, h2').on('mouseover', function(){
$(this).css({"font-family": "Papyrus", "color": "#FF2A9C"});
});
$("p:contains('hack')").css("text-decoration", "underline");
$('h1, h2').on('mouseover', function() {
$(this).css("font-family", "Papyrus");
});