This file contains 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
sudo apt-get install npm | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable | |
node -v | |
v5.0.0 | |
//find all global packages |
This file contains 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://www.googleapis.com/books/v1/volumes?q=isbn:9781451648546 | |
http://www.programmableweb.com/category/library/apis?category=20272&data_format=21190 | |
http://www.programmableweb.com/apis/directory | |
http://xisbn.worldcat.org/xisbnadmin/doc/api.htm | |
https://developers.google.com/books/docs/v1/using#ids |
This file contains 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 escapeHtml(unsafe) { | |
return unsafe | |
.replace(/&/g, "&") | |
.replace(/</g, "<") | |
.replace(/>/g, ">") | |
.replace(/"/g, """) | |
.replace(/'/g, "'"); | |
} |
This file contains 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
-g //this means global | |
--save-dev // save to the davDependencies in package.json | |
--save // save to the Dependencies in package.json | |
//find all global packages | |
npm list -g --depth=0 | |
//Install packages for a specific project locally. Install as dev dependency. | |
npm install --save-dev package-name |
This file contains 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
Step by step to create a new app from scratch | |
1. Build simple Requirements doc | |
2. Extract Use Cases from Requirements Doc | |
3. Find Use Case Dependencies. i.e. use case 5 cannot be done until 2 is complete… | |
4. Order Use Cases. Start with the most essential use case that has no dependencies. | |
5. Find all Core use cases. i.e. Adds to the structure of the app and adds data to app. Then find supporting use cases to implement to test… | |
Sketch out User experience. i.e. what will the site look like… |
This file contains 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
/** | |
* this takes in a number and returns | |
* an array of unique random numbers | |
* starting from o to the amount given. | |
* @param {number} amount this is the range and the amount of random numbers | |
* @returns {Array} unique random numbers between 0 and amount | |
*/ | |
function uniquRand(amount) { | |
var uRandA = []; | |
var random = 0; |
This file contains 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> | |
<meta charset="UTF-8"> | |
<title>DOM Manipulation</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
/** | |
* Add new DOM elements |
This file contains 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
/** | |
* Author https://github.com/timothy | |
* @return {number} | |
*/ | |
function Factorial(num) { | |
return num <=1 ? 1 : num * Factorial(num - 1); | |
} | |
console.log(Factorial(8)); |
This file contains 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 Clamp(x, min, max) { | |
return x < min ? min: (x > max ? max: x); | |
} |
This file contains 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
##This example is for Windows OS. | |
1. Create chrome shortcut. | |
2. Go to shortcut properties and add the below to the end of the shortcut target. | |
3. add as many other flags to the end as you need. i.e. --disable-web-security | |
--args --user-data-dir="/tmp/chrome_dev_session" --disable-web-security --ignore-certificate-errors --allow-running-insecure-content | |
or enter... to cmd... | |
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --args --user-data-dir="/tmp/chrome_dev_session" --disable-web-security --ignore-certificate-errors --allow-running-insecure-content | |
"Put the file location of chrome.exe for your system in the quotes..." --args --user-data-dir="/tmp/chrome_dev_session" --disable-web-security --ignore-certificate-errors --allow-running-insecure-content |
OlderNewer