Skip to content

Commit d297e3f

Browse files
committed
initial commit
0 parents  commit d297e3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+383
-0
lines changed

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# Compiled binary addons (https://nodejs.org/api/addons.html)
26+
build/Release
27+
28+
# Dependency directories
29+
node_modules/
30+
jspm_packages/
31+
32+
# Optional npm cache directory
33+
.npm
34+
35+
# Optional eslint cache
36+
.eslintcache
37+
38+
# Optional REPL history
39+
.node_repl_history
40+
41+
# Output of 'npm pack'
42+
*.tgz
43+
44+
# Yarn Integrity file
45+
.yarn-integrity
46+
47+
# dotenv environment variables file
48+
.env
49+
.env.test
50+
51+
# parcel-bundler cache (https://parceljs.org/)
52+
.cache

README.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# CS253 Assignment 0
2+
3+
| Key | Value |
4+
|-----|-------|
5+
| Points | 60 |
6+
| Assigned Date | Monday, September 23 |
7+
| Due Date | Friday, October 5 at 5:00pm |
8+
9+
Welcome to the first assignment for [CS 253: Web Security](https://cs253.stanford.edu). ✨
10+
11+
For this assignment, you're going to be completing several command-line workshops to ensure you're up-to-speed on the basics of HTML, JavaScript, and Node.js. The HTML and JavaScript material should be review from [CS 142](https://cs142.stanford.edu), while the Node.js material may be a more bit challenging.
12+
13+
## Prepare
14+
15+
### Install Node.js and `npm`
16+
17+
Install [Node.js](https://nodejs.org/en/), a popular JavaScript runtime. Node.js 10 is recommended.
18+
19+
Node.js is a program that you install on your computer. With Node.js you can use the very popular programming language JavaScript to write software. JavaScript is usually used in a browser like Chrome or Firefox but with Node.js it is possible to do a lot more. Combined with other tools, Node.js allows you to write Desktop applications like Word or iTunes, Server applications like Apache, Network applications like Curl or even mobile applications for the iPhone or Android.
20+
21+
Confirm that Node.js was installed. Open your terminal and run this command:
22+
23+
```bash
24+
node --version
25+
```
26+
27+
Node.js comes bundled with `npm`, a package manager for installing Node.js packages.
28+
29+
Confirm that it was installed:
30+
31+
```bash
32+
npm --version
33+
```
34+
35+
If you have trouble getting Node.js installed, please email the course staff or come to office hours.
36+
37+
### Get the starter code
38+
39+
Run this command, replacing `YOUR_SUNET_ID` with your SUNet ID (e.g. `feross`).
40+
41+
```bash
42+
git clone git@github.com:stanford-web-security/assign0-YOUR_SUNET_ID.git
43+
```
44+
45+
Enter the folder you just cloned with `git`:
46+
47+
```bash
48+
cd assign0-YOUR_SUNET_ID
49+
```
50+
51+
Install the necessary local dependencies with `npm`:
52+
53+
```bash
54+
npm install
55+
```
56+
57+
Install the workshops globally with this command:
58+
59+
```bash
60+
npm install -g learnyouhtml javascripting learnyounode
61+
```
62+
63+
The `-g` option installs these packages globally so that you can run them as a command in your terminal. After running this command, you'll have three new programs you can run from your terminal: `learnyouhtml`, `javascripting`, and `learnyounode`. We installed them this way so they would be easier to run since you're going to be running these commands a lot for this assignment.
64+
65+
### Use StandardJS code style
66+
67+
All the code you write for CS 253 must pass the [StandardJS](https://standardjs.com) linter. StandardJS enforces code quality, consistency, and catches several types of programmer errors.
68+
69+
You can check your code by running:
70+
71+
```bash
72+
npm run lint
73+
```
74+
75+
If you have errors, you can automatically fix them most of the time by running:
76+
77+
```bash
78+
npm run lint-fix
79+
```
80+
81+
### Run the tests
82+
83+
As you make progress, you should periodically run the test suite.
84+
85+
```bash
86+
npm test
87+
```
88+
89+
This command just runs a basic sanity test that ensures your project has the right structure and you didn't leave any required files blank. If `npm test` doesn't report any errors that doesn't necessarily mean that you've done everything perfectly!
90+
91+
## Part 1 – Learn You The HTML For Much Win! (11 points, 1 per exercise)
92+
93+
Run the following command:
94+
95+
```bash
96+
learnyouhtml
97+
```
98+
99+
You'll see the menu:
100+
101+
<img src="img/learnyouhtml.png" width=500>
102+
103+
Navigate the menu with the up & down arrow keys. Choose a challenge by hitting enter.
104+
105+
You can use any text editor you like, whether it's `vim` or `emacs` or even a visual editor like [Sublime Text](https://www.sublimetext.com/) or [VS Code](https://code.visualstudio.com).
106+
107+
## Part 2 – JavaScripting! (20 points, 1 per exercise)
108+
109+
Run the following command:
110+
111+
```bash
112+
javascripting
113+
```
114+
115+
## Part 3 – Learn You The Node.js For Much Win! (26 points, 2 per exercise)
116+
117+
Open your terminal and run the following command:
118+
119+
```
120+
learnyounode
121+
```
122+
123+
## Part 4 – Survey (3 points)
124+
125+
Answer the survey questions in `src/SURVEY.md`.
126+
127+
## Submit
128+
129+
### Before you submit
130+
131+
Ensure that the sanity tests pass:
132+
133+
```bash
134+
npm test
135+
```
136+
137+
### The moment of truth
138+
139+
Submit your work:
140+
141+
```bash
142+
npm run submit
143+
```

img/learnyouhtml.png

89.4 KB
Loading

package.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "assign0",
3+
"description": "assign0",
4+
"version": "1.0.0",
5+
"author": {
6+
"name": "Feross Aboukhadijeh",
7+
"email": "feross@feross.org",
8+
"url": "https://feross.org"
9+
},
10+
"bugs": {
11+
"url": "https://github.com/stanford-web-security/discussion/issues"
12+
},
13+
"dependencies": {},
14+
"devDependencies": {
15+
"standard": "^14.2.0",
16+
"tap-spec": "^5.0.0",
17+
"tape": "^4.11.0"
18+
},
19+
"homepage": "https://cs253.stanford.edu",
20+
"keywords": [],
21+
"license": "MIT",
22+
"main": "server/index.js",
23+
"private": true,
24+
"repository": {
25+
"type": "git",
26+
"url": "git://github.com/stanford-web-security/assign0.git"
27+
},
28+
"scripts": {
29+
"lint": "standard",
30+
"lint-fix": "standard --fix",
31+
"submit": "npm test && git commit -am 'submit'",
32+
"test": "npm run lint && tape test/*.js | tap-spec"
33+
}
34+
}

src/SURVEY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Assignment 0 Survey Questions
2+
3+
## Roughly how long did you spend on this assignment? (required)
4+
5+
## What was your favorite part of this assignment? (required)
6+
7+
## What was your least favorite part of this assignment? (required)
8+
9+
## Any other feedback for this assignment? (optional)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/array-filtering.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/arrays.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/for-loop.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/functions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/if-statement.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/introduction.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/number-to-string.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/numbers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/object-keys.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/objects.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/revising-strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/rounding-numbers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/scope.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/string-length.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/javascripting/variables.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyouhtml/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- Replace this with your solution. -->

src/learnyounode/baby-steps.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/filtered-ls.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/hello-world.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/http-client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/http-collect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/http-file-server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/http-uppercaserer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/juggling-async.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/make-it-modular.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/my-first-async-io.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/my-first-io.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/mymodule.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

src/learnyounode/time-server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO: Replace this with your solution.

0 commit comments

Comments
 (0)