Skip to content

Instantly share code, notes, and snippets.

View shiftyp's full-sized avatar

Ryan Kahn shiftyp

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shiftyp
shiftyp / index.js
Last active January 30, 2018 03:00
The Coding Test
let a = 1;
let b = 2;
let c = a + b;
module.exports = { a, b, c };
@shiftyp
shiftyp / gist:25e05496bbe48df39c57c8fe9a9e3552
Created July 12, 2016 16:00 — forked from lotusgraham/gist:63c9c27234aac0d6474af81ff517b221
Hey, I'm trying to access my state in the handle toggle event. Right now, on line 10, 'tilesData' is only set to run this toggle of expanding/collapsing the card on position 0 of the array...
export default class Cardz extends React.Component {
constructor(props) {
super(props);
this.state = {
tilesData: [
{
img: 'http://loremflickr.com/640/400/breakfast/all',
title: 'Breakfast',
@shiftyp
shiftyp / index.html
Last active April 20, 2016 17:53
About Me
<html>
<head>
<title>About Me</title>
</head>
<body>
<h1>Hi, I'm Ryan</h1>
<p>I'm a dev...and I'm awesome.</p>
</body>
</html>
@shiftyp
shiftyp / index.html
Last active April 19, 2016 09:00
Gist Editing Test
<html>
<head>
<title>Foo</title>
</head>
<body>
<p>
foo bar baz qux box + - j k
</p>
</body>
</html>
@shiftyp
shiftyp / README.md
Last active April 6, 2018 00:19
Notes from GitHub Like A Pro Workshop

Git Commands

First create an empty repository on GitHub, and clone it to your computer:

# If you've set up ssh use the ssh url, otherwise the https url
git clone git@github.com/shiftyp/my-awesome-repo.git

When you first create and clone your repository, checkout whatever branch you want to be your main branch (master for most things, gh-pages if a github page is all you'll be doing); touch a README file; and push that main branch up to github.

@shiftyp
shiftyp / README.md
Created April 17, 2016 23:10
Notes from GitHub Like A Pro Workshop

Git Commands

Start your work from your main branch like so:

# to tell waffle.io that you are starting an issue
# the key part of the branch name is `#1-`, 
# everything else is up to you.

git checkout -b feature/#1-first-issue
#############################
# Some basic shell commands #
#############################
# NOTE: You could run this script file, but you probably don't want to. Copy
# and paste the commands if you want to follow along. Also, we won't cover it
# here, but if at any time you want to quit something in the terminal you can use
# ctrl + c. Now on to the tutorial!
# In a nutshell (see what I did there ;) the shell is a program that allows you to
@shiftyp
shiftyp / README.md
Last active September 30, 2022 10:26
OOP Quiz App

OOP and MVC

What and Why

One of the big leaps you'll have to make as a JavaScript developer is wrapping your head around Object Oriented Programming (OOP). This is tough, and that's ok because it's tough for everyone at first. When you start out with JavaScript you're taught to use functions as your primary way of organizing your code. This is fine, but you'll probably find that organizing your code around objects makes larger projects easier to accomplish and improve / maintain.

The cool thing is that what OOP amounts to is an organizational strategy. I have a set of related tasks, how do I go about starting the project and organizing my code? These tasks have some variables and functions that are used to accomplish them, so you create them and write the logic for them to interact. While you can write those out as detached functions and variables, making those variables and functions into properties and methods of an object can make the division between those tasks easier to see and maintain.

Maint