Skip to content

Instantly share code, notes, and snippets.

View revisualize's full-sized avatar

Joseph revisualize

  • Seattle, Washington, USAmerica, North America, Terra, Sol, Local Interstellar Cloud, Local Bubble, Gould Belt, Orion-Cygnus Arm, Milky Way, Milky Way Subgroup, Local Galactic Group, Virgo Supercluster, Laniakea Supercluster, Observable Universe, Universe
View GitHub Profile
@revisualize
revisualize / gist:f772db38f688f424fb9f
Last active August 29, 2015 14:05
Example XHTML code for a Facebook note
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
Joseph A. Tracy's Assignement Three
</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
@revisualize
revisualize / FreeCodeCamp - Record Collection.js
Last active February 4, 2017 09:51
The FreeCodeCamp.com Record Collection check point with the instructions laid out in comments.
// Record Collection: (I have added the instructions to the comments.)
// First we need to understand that collection is an object with children objects.
// collections is an object with 4 properties: 2548, 2468, 1245 & 5439
// Each of those object properties have a child object.
// Those child objects can have up to three properties: album, artist & tracks
// Of those album & artist are strings and tracks is an array.
// Write a function which takes an album's id (like 2548),
// a property key (or name) ... prop (like "artist" or "tracks"),
@revisualize
revisualize / FreeCodeCamp - Nesting For Loops.js
Last active May 25, 2017 20:14
Challenge discussion for FreeCodeCamp.com - Nesting For Loops challenge: https://www.freecodecamp.com/challenges/nesting-for-loops
/* FreeCodeCamp - Nesting For Loops Challenge.
Total: 75 Lines on Gist.
Before we get into the challenge instructions and process,
I'd like to have an extended review for Accessing Complex Arrays &
iterating across arrays using for loops. Then we'll move into the complex arrays.
For this process, let's first create an array:
var arr = ["B", "D", "F", "H", "J", "L"]; // Even letters.
To access "B" we use arr[0]; and "J" is arr[4];
@revisualize
revisualize / FreeCodeCamp - Word_Blanks.md
Last active June 14, 2017 18:30
The FreeCodeCamp challenge Word Blanks with instructions and extra information. https://www.freecodecamp.com/challenges/word-blanks

Word Blanks

You will need to use string operators to build a new string, result,

using the parameters: myNoun, myAdjective, myVerb, and myAdverb.

Parameters are variables that represent the values that get passed into your function from the function call.

Image of function

Convert Celsius to Fahrenheit

To test your learning, you will create a solution "from scratch". Place your code between the indicated lines and it will be tested against multiple test cases.

The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5, plus 32.

You are given a variable celsius representing a temperature in Celsius. Use the variable fahrenheit already defined and apply the algorithm to assign it the corresponding temperature in Fahrenheit.

Note:

Side Question:
```js
function getName() { return "Happy Feet"; }
var name = getName();
console.log(name);
```
What do **you** think is output to the console when you log the variable `name`?
Why do you think that is? ... How does that relate to your question and to the challenge that you're working on?
Strings are Immutable. You have to completely reassign the string or create a new string.
@revisualize
revisualize / FreeCodeCamp - Stand in Line.md
Last active July 6, 2017 04:08
The FreeCodeCamp.com Stand in Line challenge with the instructions laid out in comments.

Stand In Line is a CheckPoint where you're supposed to:

Write a function nextInLine which has two parameters

an array (arr) and a number (item).

That part has been done for you here:

function nextInLine(arr, item) { }

Gist for the FreeCodeCamp Profile Lookup Challenge. Instructions as comments. Total: 39 lines.

We have an array of objects representing different people in our contacts lists.

Example: var contacts = [ { ... } , { ... } , { ... } , { ... } ];

// A lookUpProfile function that takes
// firstName and a property (prop)

Accessing values in Objects.

Dot Notation is converting the value to a string (string literal). Example: myObj.name; is the same as myObj["name"]; and as we all know quotes define strings.

If you want to use a variable for accessing the value of object properties you cannot use Dot Notation. You have to use Bracket Notation. Example: var num = 42; myObj[num];

There are a few other limitations when accessing an object property. If the object key has a space or number in it, you cannot use dot notation.

var myObj = {
@revisualize
revisualize / clone_all_github.sh
Created May 6, 2018 07:51
Complete clone of all Github repos
ORGANIZATION=xxx
USERSORGS=[users|orgs]
curl -s https://api.github.com/$USERSORGS/$ORGANIZATION/repos?per_page=300 | grep clone_url | awk -F '"' '{print $4}' | xargs -n 1 -P 4 git clone