This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fetchProtectedData(url, opts = {}) { | |
let headers = { | |
'Content-Type': 'application/json', | |
} | |
if (JWT_TOKEN) { | |
headers = { | |
...headers, | |
'Authorization': `Bearer ${JWT_TOKEN}`, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dashboard reducer | |
export default (allLists = [], action) => { | |
switch (action.type) { | |
case 'DASHBORD_FETCH_SUCCESS': | |
return action.data | |
case 'DASHBORD_FETCH_ERROR': | |
return [] | |
default: | |
return allLists | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function createStoryInBlock(req, res) { | |
const blockRecord = await BlockModel.findOne({_id: req.params.id}) | |
//this validates block _id | |
if(blockRecord === null){ | |
throw new Error('naughty naughty!') | |
} | |
const record = await StoriesModel.create({ | |
block:[blockRecord._id], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') //require the filesystem module: a standard node library | |
const util = require('util') | |
// const f = fs.readFile(__dirname + '/input.txt', { encoding: 'utf8' }) | |
// console.log('f is', f) | |
// process.exit() | |
const USER_FILENAME = __dirname + '/username.txt' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"watch": "nodemon -w public_html -e less,js --ignore *.min.js --ignore src/* -x 'grunt'", | |
"livereload": "source ~/bash_functions && server-kill 35729 && cd public_html && livereloadx --exclude 'node_modules/*'", | |
"develop": "parallelshell 'npm run watch' 'npm run watch-webpack' 'npm run livereload' ", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://sessions.thinkful.com/tilisoi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Nisi sed cillum officia velit dolore eiusmod in aute quis enim ad minim id labore aliquip elit ea elit in tempor dolor amet exercitation in laborum sint irure commodo laborum deserunt commodo ad minim officia deserunt Excepteur aute laboris qui elit laboris id in et esse laboris culpa ut nostrud Duis nulla et laborum ullamco quis deserunt elit dolor sed proident velit sed ad in in in laborum ut incididunt dolor reprehenderit sed ullamco fugiat minim Duis consequat magna cupidatat. Lorem ipsum Id et non est non in occaecat nostrud fugiat in proident consequat aliquip veniam pariatur pariatur labore laboris aliqua eu et in dolore dolore dolor eu voluptate ea irure dolore nisi in sint adipisicing aliqua ad magna consequat adipisicing mollit in ad ad qui voluptate dolore et Duis proident aliquip Duis Excepteur quis eu officia proident sit aute nisi sed cillum officia velit dolore eiusmod in aute quis enim ad minim id labore aliquip elit ea elit in tempor dolor amet exercitation in laborum sint irure commodo la |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>HTML boilerplate</title> | |
<meta charset="utf-8" name="description" content="HTML boilerplate"> | |
<!-- fonts --> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
<!-- reset --> |