Skip to content

Instantly share code, notes, and snippets.

@ChazAttack73
ChazAttack73 / 0-avoiding-this.js
Created January 9, 2016 04:18 — forked from sgnl/0-avoiding-this.js
Module Pattern - How to avoid using `this` and When you need to use `this`
module.exports = (function() {
var name = 'Ray';
var age = 32;
function doSomethingGreat() {
console.log(name);
console.log(age);
anotherGreatness();
}
@ChazAttack73
ChazAttack73 / serverCodes.md
Created January 8, 2016 22:32 — forked from sgnl/serverCodes.md
status codes

1xx: Information

Code Message Description
100 Continue The server has received the request headers, and the client should proceed to send the request body
101 Switching Protocols The requester has asked the server to switch protocols
103 Checkpoint Used in the resumable requests proposal to resume aborted PUT or POST requests

2xx: Successful

Code Message Description
@ChazAttack73
ChazAttack73 / 404.html
Created January 3, 2016 05:59 — forked from theRemix/404.html
All the elements
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Element not found!</title>
<link rel="stylesheet" href="/css/styles.css">
</head>
<body>
<h1>404</h1>
<h2>Element not found!</h2>
@ChazAttack73
ChazAttack73 / server-example.js
Created January 3, 2016 05:32 — forked from sgnl/server-example.js
Server Example for HTTP-Socket-Server
var net = require('net');
// ask NET module for new Server also setting what happens when client connects
var server = net.createServer(whenSomeoneConnects);
// server's connect event
function whenSomeoneConnects(socketReq) {
console.log('SOMEONE CONNECTED TO MY SERVER');
socketReq.on('data', function(buffer){
@ChazAttack73
ChazAttack73 / throwing-darts.md
Created January 2, 2016 19:12 — forked from sgnl/throwing-darts.md
Throwing Darts

Throwing Darts

You've just recently been hired to calculate scores for a Dart Board game

Scoring Specs

  • 0 points: radius above 10
  • 5 points: radius between 5 and 10 inclusive
  • 10 points: radius less than 5

If all radiuses are less than 5, award 100 BONUS POINTS! An empty array should return 0.

@ChazAttack73
ChazAttack73 / README.md
Created December 31, 2015 19:14 — forked from sgnl/README.md
GettyImages.com API
@ChazAttack73
ChazAttack73 / sorting-algorithms.md
Created December 30, 2015 02:14 — forked from JoeKarlsson/sorting-algorithms.md
Five popular sorting algorithms implemented manually and visualized with DOM manipulation
@ChazAttack73
ChazAttack73 / README.md
Created December 29, 2015 19:17 — forked from sgnl/README.md
5-day forecast
@ChazAttack73
ChazAttack73 / README.md
Created December 29, 2015 02:54 — forked from sgnl/README.md
creating gulp-seed

Setup

  • create a folder for your seed, e.g. es6-sass-seed
  • install Gulp-js: npm install -g gulp
  • initialize npm: npm init
  • save Gulp as a dependency for your project
    • npm install --save-dev gulp or npm install -D gulp
  • create a gulpfile.js at the root of your project directory
  • gulpfile.js should look like this, ex:
@ChazAttack73
ChazAttack73 / README.md
Created December 28, 2015 20:25 — forked from sgnl/README.md
Adding Mocha/Chai to your project (morning exercise edition)

Read the docs?

Mocha Chai

In your project directory

  • Initialized git?
  • Initialized npm?

Install Packages