Skip to content

Instantly share code, notes, and snippets.

View donoage's full-sized avatar

Stephen Bae donoage

  • Upstart
  • New York, NY
View GitHub Profile
@donoage
donoage / docker-compose.yml
Created March 3, 2020 22:23 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
$(document).ready(function(){
// Array to store all feed sources
var SOURCES = [
{
displayName: "Reddit",
url: "https://www.reddit.com/r/worldnews/top/.json",
proxyRequired: true,
defaultSource: true, // You can have only one default source
formatResponse: function(response) {
//we create an object called _
var _ = {
//the first property is called map it's a method that takes two arguments
//the first argument is list, the second is a call back function
map: function(list, cbFn) {
//this funciton creates a new array
var newArray = [];
//it uses a forEach loop to go through list returning the element i'm not sure what index is doing?
list.forEach(function(elem, index) {
@donoage
donoage / gist:c59c0e9cd9f1c660fe6526cb2c9f8cf6
Last active April 29, 2017 21:50 — forked from rachel-yankelevitz/gist:c049063f4f8c59fbce5fba099d795e04
Homework 3 underscore map.js description
// This is the creation of a variable called "_" which is a method
// Stephen: Not a method. variable '_' is an object.
var _ = {
// on this line the first key value is function (so a function within the variable method).
// This function will take to params: list and cbFn
// Stephen: this map() function is a property of '_' object that takes an array and a function reference as their params.
map: function(list, cbFn) {
// within the method's function, there is a new local variable, newArray, which is an empty array
// Stephen: We establish 'newArray', which is an empty array to store the result from forEach() below.
var newArray = [];
@donoage
donoage / todo.js
Last active April 24, 2017 00:30 — forked from bmacmill/todo
// curious what this is doing? https://learn.jquery.com/using-jquery-core/document-ready/
//bn notes: kind of a mess, lots of notes by myself you can ignore, couldn't get focus to work??? :/
$(document).ready(function() {
// write your code here
/*You should be working in `app.js` in `homeworks/homework-02/js`. I commented out the
predefined list items in index.html because the todolist is empty when
the page starts. You need to use those list items as a reference for
the html that's to be inserted onto the page.
*/
// Homework 1
// Hint: You may need SOME of these array iterator methods:
// .map(), .filter(), .forEach() , .some(), .every()
// Hint: You may also need SOME of the following methods:
// Number(), .reverse(), typeof(), .join()
// Let's say we have an array of prices named `prices`.
var prices = ['100', '125', '129', '37', '38', '75', '87', '94', '300', '301',
'305', '50', '0.30', '0.01', '0.5', '5', '15', '24', '35', '1041', '1', '17',