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
//////////////////// | |
// 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
// 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
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
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
//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
//Create a new repository | |
git init | |
//Start copy from github | |
git clone https://github.com/LayneSmith/shotput.git | |
//Fetch and merge changes on remote server to your working directory | |
git pull | |
//List all remote and local branches |
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
git checkout <branch name> | |
git add . | |
git commit -m "enter a commit message" | |
git checkout master | |
git merge <branch name> | |
git add . | |
git commit -m "merged" | |
git push origin master |
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
///Branching an existing branch | |
git pull origin <original branch name> | |
git checkout <original branch name> | |
git checkout -b <new branch name> | |
# Edit some files | |
git add . | |
git commit -m “Added some stuff” | |
git push origin <new branch name> |
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
$sql = "SELECT COUNT(*) FROM " . $thisTable . " WHERE ip = '$ip'"; | |
echo $sql; | |
$res = $db->query($sql); | |
if (! $res) { | |
print_r($db->errorInfo()); | |
} | |
$duplicateIP = $res->fetchColumn(); |