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
Freddies-MBP:Market-Data freddiejones$ git branch | |
* b-input-misalignment | |
master | |
Freddies-MBP:Market-Data freddiejones$ git status | |
On branch b-input-misalignment | |
Changes to be committed: | |
(use "git reset HEAD <file>..." to unstage) | |
modified: client/actions/stockActions.js | |
modified: client/actions/userActions.js |
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
Freddies-MBP:~ freddiejones$ cd /Users/freddiejones/Documents/Code/Market-Data | |
Freddies-MBP:Market-Data freddiejones$ | |
Freddies-MBP:Market-Data freddiejones$ git branch | |
* b-input-misalignment | |
master | |
Freddies-MBP:Market-Data freddiejones$ pwd | |
/Users/freddiejones/Documents/Code/Market-Data | |
Freddies-MBP:Market-Data freddiejones$ git branch | |
* b-input-misalignment | |
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
Freddies-MBP:Market-Data freddiejones$ npm run vagrant | |
> [email protected] vagrant /Users/freddiejones/Documents/Code/Market-Data | |
> rm -f config.json && vagrant up && vagrant ssh -c "sudo cat /home/vagrant/config.json" >> config.json && vagrant ssh | |
Bringing machine 'default' up with 'virtualbox' provider... | |
==> default: Checking if box 'debian/jessie64' is up to date... | |
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision` | |
==> default: flag to force provisioning. Provisioners marked to run always will still run. |
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
//initially you get: | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch Chrome against localhost", | |
"type": "chrome", | |
"request": "launch", |
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 gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var browserSync = require('browser-sync').create(); | |
var useref = require('gulp-useref'); | |
var uglify = require('gulp-uglify'); | |
var gulpIf = require('gulp-if'); | |
var cssnano = require('gulp-cssnano'); | |
var imagemin = require('gulp-imagemin'); | |
var cache = require('gulp-cache'); | |
var del = require('del'); |
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 sum_pairs=function(ints, s){ | |
var newArr = []; | |
for (var k = 0; k < ints.length; k++) { | |
for (var n = k + 1; n < ints.length; n++) { | |
if (ints[k] + ints[n] == s) { | |
var final = newArr.push(ints[k], ints[n]); | |
return newArr; | |
} | |
} | |
} |
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 sumPairs(values, target) { // or "sum_pairs", but camelCase is the JS convention | |
var limit = values.length, | |
result, | |
i, j; | |
for(i = 0 ; i < limit ; i++) { | |
for(j = i+1 ; j < limit ; j++) { | |
if(values[i] + values[j] == target) { | |
result = [values[i], values[j]]; | |
limit = j; |
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
// Task | |
// Given a list lst and a number N, create a new list that contains each number of lst at most N times without reordering. | |
// For example if N = 2, and the input is [1,2,3,1,2,1,2,3], you take [1,2,3,1,2], drop the next [1,2] | |
// since this would lead to 1 and 2 being in the result 3 times, and then take 3, which leads to [1,2,3,1,2,3]. | |
function deleteNth(arr,x){ | |
for(var k = 0; k < arr.length; k++) { | |
var counter = 1; | |
var empty = []; |
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 circ = document.getElementById('circ'); | |
const outerCirc = document.getElementById('outer-circ'); | |
const circTwo = document.getElementById('circ-two'); | |
const outerCircTwo = document.getElementById('outer-circ-two'); | |
var scrollRaf = false; | |
var circAng = 0; | |
var circAngPerSec = 60 / 1000; // 60deg/sec |
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 rotateCircle(targetCircle, degrees) { | |
let circleOne = document.querySelector(targetCircle); | |
circleOne.style.transform = 'rotate(' + degrees + 'deg)'; | |
} | |
let targetD = -45; | |
function setD(f){ | |
targetD = f; | |
} |
OlderNewer