Skip to content

Instantly share code, notes, and snippets.

View brittanydionigi's full-sized avatar

Brittany Dionigi brittanydionigi

View GitHub Profile
@brittanydionigi
brittanydionigi / git.md
Last active July 12, 2017 15:34
backwards planning example
Git * Hooks * Branches * Remotes * Locals
@brittanydionigi
brittanydionigi / manifest.json
Created July 10, 2017 16:21
example manifest
{
"short_name": "FakeNews",
"name": "Fake News - Your #2 Source for Fake News",
"icons": [
{
"src": "img/logo-48x48.png",
"type": "image/png",
"sizes": "48x48"
},
{
@brittanydionigi
brittanydionigi / server.js
Last active July 6, 2017 15:20
Example: Node/Express server with JWT authentication for an endpoint
// =================================================================
// require all necessary packages =================================
// =================================================================
const express = require('express');
const cors = require('cors');
const app = express();
const jwt = require('jsonwebtoken');
@brittanydionigi
brittanydionigi / css-challenge-0206.md
Last active February 6, 2017 19:50
CSS Challenge 02/06

Using just HTML & CSS, create a button with the following hover effect:

@brittanydionigi
brittanydionigi / primitives.md
Last active February 1, 2017 13:48
js-fundamentals-primitives

Extend the primitive Array data type to allow a groupBy method so that when given an array of objects, you can group each array item by a specified property.

For example, given an array of Turing students:

let students = [
  { name: "Jane", module: "4FE", track: "frontEnd" },
  { name: "Jane", module: "3FE", track: "frontEnd" },
  { name: "Jane", module: "3BE", track: "backEnd" },
  { name: "Jane", module: "4FE", track: "frontEnd" },

intro

So you just got a little primer on security from Meeka, I'm going to reiterate some of the things she mentioned, mostly that security is hard.

SECURITY MEETUP

I was actually at a node.js meetup last year where someone gave a talk about security and they said when the internet first came around, there was a list of like, 9 or 10 security issues that needed to be addressed that we needed to find a permanent solution for, and as of 2015 not a single one of them had been crossed off the list.

USER AUTH + TRANSMITTING APP DATA

So we are all notorious for sucking as security. But there are some precautions we can take with our apps to at least tryyyyy to make them more secure. As app developers, our main concerns with security are going to be (1) user authentication and (2) transmitting application data in a verifiable and trusted manner.

JWTs

@brittanydionigi
brittanydionigi / approval-requests.md
Last active May 23, 2016 13:38
approval-requests
We couldn’t find that file to show.
return fetch('http://localhost:8080/api/v2/hb/', {
method: 'POST',
mode: 'cors',
body: JSON.stringify(data),
headers: new Headers({
'Content-Type': 'application/json'
})
})

"if" means inverse frequency and the unit here is minute
e.g. "if < 20" means the user has exhibited that behavior (on average) more than once per 20 minutes
so when "if < 5", then "frequency > 1/5"
so it would be higher than once per 5 minutes!

and "c" means the number of times the behavior has been exhibited so far (since the installation of the addon)
so -c > 10 -if < 20 means the user has done something at least 10 times with a frequency of higher than once per 20 minutes