Skip to content

Instantly share code, notes, and snippets.

Avatar

Timothy Barnes barnes7td

  • CleanSlate
  • Indianapolis, IN
View GitHub Profile
View component.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gone-with-the-wind.json
{
"title": "Gone with the Wind: The visual version",
"id": 12875,
"pages": [
{
"id": 12,
"number": 1,
"image": {
"filename": "scarlet.png",
"size": 215
View ruby_student_confusion.rb
# INSTRUCTIONS:
# Create a function named createArray. This function should:
# 1. Define a method named countries_visited.
# 2. The method should return an Array of the countries in alphabetical order..
# 3. The method should return an Array without duplicate values.
# Tests Given:
View rails_router_version_1.rb
require 'action_dispatch/journey/core-ext/hash'
require 'action_dispatch/journey/router/utils'
require 'action_dispatch/journey/router/strexp'
require 'action_dispatch/journey/routes'
require 'action_dispatch/journey/formatter'
before = $-w
$-w = false
require 'action_dispatch/journey/parser'
$-w = before
View student-confusion.js
// INSTRUCTIONS:
// Create a function named createArray. This function should:
// 1. take four arguments
// 2. return an array with those arguments as elements
// Tests Given:
var expect = require("chai").expect;
View output.txt
./courses/rails-web-development/foundation/18-Address-Bloc-Basic-Ruby-App.md:<!-- SLOTH { repo: "address-bloc", hash: "ca9f3a7", comment: "Basic Ruby App: Snippet 1", filename: "address_bloc/address_bloc.rb", code_type: "ruby" } -->
./courses/rails-web-development/foundation/19-Address-Bloc-Models.md:<!-- SLOTH { repo: "address-bloc", hash: "dfe738a", comment: "Models: Snippet 1", filename: "spec/entry_spec.rb", code_type: "ruby" } -->
./courses/rails-web-development/foundation/19-Address-Bloc-Models.md:<!-- SLOTH { repo: "address-bloc", hash: "203a1de", comment: "Models: Snippet 2", filename: "models/entry.rb", code_type: "ruby" } -->
./courses/rails-web-development/foundation/19-Address-Bloc-Models.md:<!-- SLOTH { repo: "address-bloc", hash: "4e96007", comment: "Models: Snippet 3", filename: "spec/entry_spec.rb", code_type: "ruby" } -->
./courses/rails-web-development/foundation/19-Address-Bloc-Models.md:<!-- SLOTH { repo: "address-bloc", hash: "2edce78", comment: "Models: Snippet 4", filename: "models
View html_nodes.js
...
<p id="test"> Hey <span>Text</span> </p>
...
var linkText = document.getElementById('test').textContent; Hey Text
var linkText = document.getElementById('test').innerText; Hey
var linkText = document.getElementById('test').childNodes[0].nodeValue; Hey
var linkText = document.getElementById('test').firstChild.nodeValue; Hey // Only works on Text nodes
@barnes7td
barnes7td / 0_reuse_code.js
Created Aug 18, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@barnes7td
barnes7td / Git Workflows.pdf
Last active Apr 7, 2019
Basic Git Terms and Workflows
View Git Workflows.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View git-terms.md

git init - Create a repo from scratch.

git clone - Copy a repo from GitHub or other remote repo.

git add - Stage files or file changes to your local repo.

git commit - Commit (Save changes as a record) to the local repo.

git merge - Add changes from another branch onto current branch.