Skip to content

Instantly share code, notes, and snippets.

View HallM's full-sized avatar

Matthew Hall HallM

View GitHub Profile

Session State Management & Security

Intro

  • This talk is focused on the concepts, not the commonly used competing strategies.
  • Knowing the details helps fine tune the implementation for certain scenarios depending your requirements

JWT vs Session IDs:

Sessions IDs

@HallM
HallM / templatecode.txt
Last active July 28, 2016 22:43
First pass for a template bytecode / vm
{fn (p1 p2)
{def c {fn (p3 p4)
{* {+ p1 p3} {- p4 p2}}
}}
{c 1 2}
}
fns immediately executed in the same scope do not need special closure style
using the stack works just fine.
var five = require("johnny-five");
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var path = require('path');
var board = new five.Board();
app.get('/', function(req, res) {
res.sendFile(path.resolve('index.html'));
<html>
<head>
<title>BOT CONTROLLER</title>
</head>
<body>
<input type="text" id="botcontroller" />
</body>
<script src="/socket.io/socket.io.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>

Introduction

What can I do with a language?

  • Domain Specific Language (DSL) for sharing data or making a task simpler
  • template language (dust, handlebars, lisplate)
  • maybe you want your own ES2017 to ES5
  • port a language/environment (porting Smallbasic to a browser)
  • create a whole new langauge
@HallM
HallM / sudokusolve.js
Last active September 23, 2016 16:54
a simple, easy-level sudoku solver (missing many techniques, but a start...)
// see https://github.com/HallM/sudokusolvers/
// first 4 bits are allocated for the value (1-9)
// next 9 bits are used for the "pencil marks"
const ONE = 1 << 4;
const TWO = 1 << 5;
const THREE = 1 << 6;
const FOUR = 1 << 7;
const FIVE = 1 << 8;
const SIX = 1 << 9;