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
//DISPLAY SHARED PAGE WITH ALL RESULTS | |
//FIND SPECIIFIC ENTRIES IN TABLES | |
appRouter.route('/know-me-2016/display/:first_list_id/:second_list_id?').get(function(req,res){ | |
req.models.know_me_2016 | |
.find({ or: | |
[{list_id: req.params.first_list_id}, {list_id: req.params.second_list_id}] | |
}) // Select list | |
.run(function(err, results){ | |
if(err){ | |
res.send(err); } |
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
var weeks = [ | |
"Giants", | |
"Redskins", | |
"Bears", | |
"49ers", | |
"Bengals", | |
"Packers", | |
"Bye", | |
"Eagles", | |
"Browns", |
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 buildList(spreadsheet) { | |
$.getJSON("https://spreadsheets.google.com/feeds/list/" + spreadsheet + "/od6/public/values?alt=json", function (data) { | |
//Insert the hed and dek divs. | |
$('#listContainer').html('<div id="hed"></div><div id="deck"></div>'); | |
//In console, you can see what info is being returned so you know how to get at the info you need. Remove for deployment. | |
//console.log(data); |
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
// BASIC | |
.container { | |
display:flex; | |
border:10px solid goldenrod; | |
height:500px; | |
flex-wrap: wrap; | |
} | |
.box { | |
width: 33.333333%; | |
} |
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
//////////////////// | |
// IMPORTS | |
//////////////////// | |
@import 'variables'; //imports _variables.scss | |
@import 'mixins'; | |
//////////////////// | |
// VARIABLES | |
//////////////////// | |
$dmn-blue: #454545; |
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
import $ from 'jquery'; | |
import shuffle from 'lodash.shuffle'; | |
import getdata from './import'; | |
// import d3 from 'd3-fetch'; | |
import './furniture'; | |
const arr = ['a', 'b', 'c', 'd']; | |
console.log(shuffle(arr)); | |
getdata((data) => { |
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
// Paste any snippet into a console window to see it in action. | |
// You can filter all these in console, ie: just show info etc... | |
console.log('This is a plain log'); // Plain log | |
console.warn('This is a warning'); // Yellow with warning | |
console.error('This is an error'); // Red with warning | |
console.info('This is info'); // Blue with info | |
console.debug('This is debug'); // Plain log BUT type is also blue | |
// String substitution |
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
# install virtualenv | |
pip install virtualenv | |
# create a virtualenv called "django-env" | |
# with no site packages or furniture | |
virtualenv --no-site-packages django-env | |
# activate the virtualenv | |
source django-env/bin/activate |
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
/////////////////////////////////////////////////// | |
// LOAD FILES FROM SONGS LIST | |
/////////////////////////////////////////////////// | |
let initialFunction = function () { | |
return new Promise((resolve, reject) => { | |
console.log('%cinitialFunction....', "color: purple; font-size: 24px;"); | |
resolve('initialFunction COMPLETE'); | |
}); | |
}; | |
let function1 = function () { |
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 Dog(name, breed) { | |
// this.name = name; | |
// this.breed = breed; | |
// } | |
// | |
// Dog.prototype.bark = function () { | |
// console.log(`Bark Bark! My name is ${this.name}`); | |
// }; | |
// Dog.prototype.cuddle = function () { | |
// console.log('I love you, owner!'); |