Skip to content

Instantly share code, notes, and snippets.

View mklemme's full-sized avatar
🤓
Always be creating

Myk Klemme mklemme

🤓
Always be creating
View GitHub Profile
/* I'm going to the gym, but if anyone solves wants to integrate the method before I finish, here's how my loop logic works:
1. Check if the square already has the class "selected"
if it doesn't go to 2, otherwise do nothing (I sent a console.log just to make sure shit was happening on the backend)
2. Check the value of playerCounter. If it is even do actions for player1 & odd for player2. Within the loop, I have playerCounter++ to increase the counter and go to the next player.
3. Grab the html div attribute "data-box-id" off the clicked element to push to a player's array. Every box has "1" to "9".
*** Nothing beyond this is tested yet. Mostly theory ***
document
//#document<!DOCTYPE html><html>​…​</html>​<head>​…​</head>​<body>​…​</body>​</html>​
document.head
// <head>​<meta charset=​"utf-8">​<title>​Le DOM playground​</title>​<script src=​"script.js">​</script>​<link rel=​"stylesheet" href=​"styles.css">​</head>​
document.links
// []
document.documentURI
@mklemme
mklemme / geo.js
Last active August 29, 2015 14:07
// You and some friends usually play a gathering game (like a scavenger hunt) using geo-coordinates in a park, but it has gotten so popular that many people want to join in. One of your friends created an API for people to add items hidden in the park, but now you want to build an App to help people decide what to find in the park.
// You are given the following set of data as a result back from an API and you want to sort those results in terms of proximity to the user of your site.
// var myResults = [ {name: "six pack of beer", location: {lat: 37.767182, long: -122.5}},
// {name: "whacky glasses", location: {lat: 37.767182, long: -122.51}},
// {name: "whiskey bottle", location: {lat: 37.767282, long: -122.49}},
// {name: "diving goggles", location: {lat: 37.770282, long: -122.503}},
// {name: "running shoes", location: {lat: 37.7669, long: -122.457}},
// {name: "paint brushes", location: {lat: 37.76800, long: -122.4580}}]

##Command Line Basics

What are the terminal commands to:

  • Create a new folder called "Blah"
mkdir Blah
  • Move into the newly created "Blah" folder