Skip to content

Instantly share code, notes, and snippets.

View kauffmanes's full-sized avatar

Emily Kauffman kauffmanes

View GitHub Profile
# Git Aliases
alias gl='git pull --prune'
alias rw='checkout -'
alias co='checkout'
alias ci='commit'
alias st='status'
@kauffmanes
kauffmanes / SO1.md
Created March 7, 2023 19:10
Stack Overflow Answer
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
// FILE #1: app/utils/session.ts
import jwt from 'jsonwebtoken';
import { redirect } from 'remix';
export function requireValidSession(request: Request) {
// assuming key is stored as base64
// if not, no need for this line, just use env var directly
const publicKey = Buffer.from(process.env.JWT_PUBLIC_KEY || '', 'base64').toString('ascii');
const tokenName = process.env.USERFRONT_TOKEN_NAME || '';
@kauffmanes
kauffmanes / ppa-server.md
Created May 28, 2020 17:33
Setting up a PPA Server

DON'T USE THIS YET - WORK IN PROGRESS

What's a PPA?

I've recently been trying out Electron.js for a number of new projects and it's so great to work with. It's useful for building desktop applications as advertised, but also for applications running in kiosk mode, such as an ATM screen or embedded GUI. The development of an Electron application is outside the scope of this article, but I'm mentioning it because that process outputted the .deb file that I'll using in this article.

So what is a PPA? PPA stands for Personal Package Archive and it's a way for developers to create source packages for Ubuntu that can be built and published as an apt repository. When you add your repository to your sources list, Ubuntu can perform updates just like any other Ubuntu package. If any of this sounds like a foreign language, I recommend reading this PPA Guide.

Setting up the Server

First you'll want to update your ins

@kauffmanes
kauffmanes / index.html
Created January 22, 2020 01:39
Exercise 1: Recipe Markup
<!doctype html>
<html>
<head>
<title>My Cookie Recipe</title>
<meta charset="utf-8" />
</head>
<body>
<h1>Best Chocolate Chip Recipe</h1>
<ul>
<li>1 cup butter, softened</li>
@kauffmanes
kauffmanes / create-robomaker-resources.sh
Last active January 17, 2020 00:09
Creating robomaker resources using the CLI
#!/bin/bash
set -e
echo "Enter the robot's serial number (ex. FX250123)"
read ROBOT_SN
if [ -z $ROBOT_SN ]
then
echo "A robot serial number is required."
exit
@kauffmanes
kauffmanes / FinalProject.ipynb
Created December 13, 2018 05:33
Final Project Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kauffmanes
kauffmanes / install_anaconda.md
Last active April 30, 2026 00:14
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog, too.

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Ana
@kauffmanes
kauffmanes / GetStarted.md
Last active April 20, 2018 00:04
Getting Started File

Getting Started

Codearena is a tool to aid in accessibility in the classroom.

Download the project from courseweb. It is a zip file consisting of two folders: codearena-api and codearena-client. Codearena-api is the Erlang server and codearena-client is the web interface.

Database Setup

This application uses CouchDB to store the code arenas. To set this up, create a database called arenas.

Dependencies:

  • couchdb (installed and running)
%% @author kauff
%% @doc @todo Add description to serv1.
-module(serv1).
%% ====================================================================
%% API functions
%% ====================================================================
-export([start/0, start/1, stop/1]).