###Why: I always felt that there was a need for a site that allowed for people to just play with the way that colors moved and how they interacted when touching other colors. Sure, theres lots of color wheel sites out there but thats not what color lovers is about, its about just seeing tons of colors at once and basically swiping left or right. Its like tinder for color palletes and I aimed to replicate that experience. ###What I did: The last time I used javascript canvas technolgies was when RaphelJS was all the rage, I wanted to experiment and try new technologies and see what was new. After some googling and asking around I stumbled upon PaperJS . It has a great easy to use api and seemed like a great fit. I wanted my app to be fully interactive so I went with redux to handle the client interaction and the actual html display. After that it was simply a matter of just doing things on timeouts to match up with the browser running at 60fps. Just do everyt
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
SELECT start_date, duration | |
FROM assignments | |
WHERE start_date < '2016-01-26' | |
AND start_date + duration < '2016-01-26' | |
ORDER BY start_date DESC; |
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
// given these models | |
Soldier = bookshelf.Model.extend({ | |
tableName: 'soldiers', | |
tasks: function() { | |
return this.hasMany(Activity); | |
}, | |
company: function() { | |
return this.belongsTo(Company); | |
}, | |
MOS: 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
#!/bin/bash | |
set -xe | |
/opt/elasticbeanstalk/containerfiles/ebnode.py --action node-install | |
# Update npm | |
cd /opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/ && sudo ./node npm update npm -g |
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
FROM ubuntu:15.04 | |
RUN apt-get update | |
RUN apt-get install -y node python2.7 gcc make gyp build-essential | |
RUN mkdir -p /usr/src/app | |
ENV NODE_ENV=DEVELOPMENT | |
WORKDIR /usr/src/app | |
ONBUILD RUN npm install | |
ONBUILD COPY . /usr/src/app |
This exercise is all about passing the output of one function into the input of another function, over, and over again. This is a core concept in javascript
Imagine that we have a a piece of iron and we need to refine it and convert it to steel, lets define an object to represent this material
var product = {
material: 'iron',
carbon: false,
Area of Difficulty | Affects | Possible Solution |
---|---|---|
text | visually-impaired users | select readable fonts, set in easy-to read sizes (magnifiers also help) |
colors | colorblind/color-deficient users | select high-contrast colors (dark text on light background is best) |
mouse events | visually |
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
call plug#begin('~/.nvim/plugged') | |
Plug 'kien/ctrlp.vim' | |
Plug 'mattn/emmet-vim' | |
Plug 'scrooloose/nerdtree' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'ervandew/supertab' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-endwise' | |
Plug 'bling/vim-airline' | |
Plug 'elzr/vim-json' |
##How to Play
Here is the app we will be attacking: http://hacksmith.herokuapp.com This app uses the standard authentication procedures we have been using in class. However, the authentication tokens were disabled, which allows users to make GET/POST requests without coming from another page in the app!
Using the techniques described in the following two recent articles, attempt to log in as an administrator:
Your strategy will be:
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
/** | |
* I have an array stock_prices_yesterday where: | |
* | |
* - The indices are the time in minutes past trade opening time, which was 9:30am local time | |
* - The values are the prices in dollars of Apple stock at the time | |
* | |
* For example, the stock cost $500 at 10:30am, so stock_prices_yesterday[60] = 500; | |
* | |
* Write an efficient algorithm for computing the best profit I could have made from 1 purchase | |
* and 1 sale of 1 Apple stock yesterday |