Skip to content

Instantly share code, notes, and snippets.

View barnes7td's full-sized avatar

Timothy Barnes barnes7td

  • CleanSlate
  • Indianapolis, IN
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"title": "Gone with the Wind: The visual version",
"id": 12875,
"pages": [
{
"id": 12,
"number": 1,
"image": {
"filename": "scarlet.png",
"size": 215
# 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:
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
// 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;
./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
...
<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 August 18, 2016 18:25
Here are some things you can do with Gists in GistBox.
// 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 April 7, 2019 19:32
Basic Git Terms and Workflows
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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.