Skip to content

Instantly share code, notes, and snippets.

View damwhit's full-sized avatar

David Whitaker damwhit

View GitHub Profile
@damwhit
damwhit / mod_0_session_3_practice_tasks.md
Last active October 28, 2020 18:24 — forked from rwarbelow/mod_0_session_4_practice_tasks.md
Mod 0 Session 3 Practice Tasks

Session 3 Practice Tasks

The assignments listed here should take you about 1 hour in total.

To start this assignment:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
  2. Click the Edit button when you're ready to start adding your answers.
  3. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
@damwhit
damwhit / Quick_Open_Editor.md
Last active July 1, 2019 05:16 — forked from timomitchel/Quick_Open_Editor.md
How to configure your editor to open from the command line

Steps to Enable Shell Command

Atom

You can try opening Atom and clicking on the Atom tab to navigate to the Install Shell Commands prompt.

Atom-Shell-Commands

Open a terminal window and type atom .

@damwhit
damwhit / mod_0_session_1_readings.md
Last active September 8, 2020 01:44 — forked from rwarbelow/mod_0_session_2_readings.md
Mod 0 Session 1 Readings

Session 1 Readings and Responses

The readings and responses listed here should take you approximately 25 minutes.

To start this assignment, click the button in the upper right-hand corner that says Fork. This is now your copy of this document. Click the Edit button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

  • Your key take-aways OR how you're going to implement specific points (minimum 2):
@damwhit
damwhit / array-prototypes.md
Last active June 1, 2018 16:15
Array Prototype Practice!

Return the first string

With an array that is mostly boolean, write a function that will return the first string.

For example, if we have the following array:

var things = [
  true,  true,  true,  false,
  true,  true,  1,  true,
@damwhit
damwhit / 1711-CSS-Challenges.md
Created December 4, 2017 15:57
Place for 1711 to link to their gists in the comments

Example!

Challenge 5

I used these elements and specified these styles to make this thing happen. I chose to use white text color because you can't see it if it's black. (duh). (When you write this make your actual description more meaningful...)

Challenge 5

@damwhit
damwhit / require-1511.markdown
Last active May 24, 2016 04:40 — forked from rrgayhart/require-1511.markdown
The Concept of Require

When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.

Read Node.js, Require and Exports and Organize Your Code with RequireJS

Fork this gist and answer the following questions:

  • In the context of Node, what is a module?
  • A module maps directly to a file. A module is private until it is exported using module.exports and imported using require.
**Step One**: Watch [Sorting Algorithms in JavaScript](https://www.youtube.com/watch?v=uRyqlhjXYQI)
**Step Two**: Fork this gist.
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?"
Fast algorithms can take up a lot of memory, and vice versa. ie. merge sort takes up a ton of space but is much faster than insertion sort that is slower but also takes up less memory. This is a particularly important consideration if you are working with very large sets of data. Bubble sort can be twice as slow as insertion sort even if it has a smaller amount of data.
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you.
  1. Add gem 'rails_12factor' to your Gemfile. This will add error logging and the ability for your app to serve static assets.
  2. bundle
  3. Run RAILS_ENV=production rake db:create db:migrate db:seed
  4. Run rake secret and copy the output
  5. From the command line: export SECRET_KEY_BASE=output-of-rake-secret
  6. To precompile your assets, run rake assets:precompile. This will create a folder public/assets that contains all of your assets.
  7. Run RAILS_ENV=production rails s and you should see your app.
  8. No need to have username and password in database.yml under production for running production locally unless you want those things.

Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.

### [grow food] - working title

### Pitch

This app would allow folks who are given vegetable/herb starts or seeds a way to 
search/select a certain vegetableto see how it's grown and how to harvest it,
you can also search by vegetable get recipes that include it.

### Problem

#Git Commands

##git stash

  • git stash is used to save the state of your working directory as well as your index directory.
  • It also reverts you back to a clean directory at your HEAD commit.

##git stash apply

  • git stash apply allows you to revert to a previous stash by either specicfying ie. git stash apply stash@{2}, which will take you back to the specified stash.
  • Or, simply typing git stash apply will revert to your most recent stash.