Skip to content

Instantly share code, notes, and snippets.

View JoeKarlsson's full-sized avatar
🏠
Working from home

Joe Karlsson JoeKarlsson

🏠
Working from home
View GitHub Profile
@JoeKarlsson
JoeKarlsson / memsql-helios-commands.sql
Created August 24, 2021 22:09 — forked from robrich/memsql-helios-commands.sql
Welcome to MemSQL Helios
-- create a database
create database cosmeticshop;
-- create a table
use cosmeticshop;
create table cosmeticshopfunnel
(
event_time TIMESTAMP,
event_type CHAR(18),
product_id CHAR(10),
@JoeKarlsson
JoeKarlsson / README.md
Created February 1, 2016 22:44 — forked from thgaskell/README.md
Basic Authentication with Passport

Basic Authentication with Passport

Basic authentication is one of the simplest authentication strategies because it doesn't require cookies, sessions, or even a login form! Instead, it uses HTTP headers which means credentials are transmitted on each request.

Installation

You will need to install passport and passport-http. The passport-http module is what allows you set up the Basic Authentication Scheme, in addition to a couple other authentication strategies.

$ npm install express passport passport-http --save
@JoeKarlsson
JoeKarlsson / README.md
Last active September 16, 2015 01:08 — forked from jaywon/README.md
JavaScript OOP Reflector

##Your Challenge Reflection is a common utility in Object Oriented languages for inspecting classes and deriving information about what properties/methods they expose and other classes they inherit from. We will be writing our own JavaScript reflector today!

We are going to write a simple utility that will inspect a given object, and tell us about the object and it's inheritance chain.

###Your Tasks

  1. Create 3 classes:
  • User
  • GroupUser
  • SuperUser
@JoeKarlsson
JoeKarlsson / stack-challenge.md
Last active September 4, 2015 20:19 — forked from jaywon/stack-challenge.md
Use a Linked List to simulate a stack trace

###Console History Sim Stack Trace Challenge

Using a linked list, we are going to demonstrate a use case for a linked list and simulate a stack like you see in a stack trace that replays the history of what we typed.

  1. Add a text box to an HTML page and a 2 buttons, save and dump.
  2. Every time the user clicks the first button to save, we are going to save the text input to our linked list as the most recent node or head.
  3. Whenever someone clicks the dump button we are going to dump out all of the input they've typed in to that point from most recent to oldest. This should be written as HTML to the page.
@JoeKarlsson
JoeKarlsson / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console