Skip to content

Instantly share code, notes, and snippets.

View willkessler's full-sized avatar

Will Kessler willkessler

View GitHub Profile
@willkessler
willkessler / init.el
Created October 17, 2024 18:40
Current emacs init.el
;;; package -- Configuring emacs for React editing
;;; Last update: 11/15/2016. By Will Kessler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Set up melpa.
;; cf: http://melpa.org/#/getting-started
;;
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
@willkessler
willkessler / learning_management_system.md
Created August 1, 2019 21:05
A Student Learning Management System

A Student Learning Management System

Implement a program that can enroll, unenroll, and waitlist students in online courses.

You may make either a command-line application (CLI) that accepts a text file as input, or a web application that accepts GET and POST requests.

If developing a CLI, the text file will consist of input commands (one per line)

@willkessler
willkessler / workspace_utils.py
Created January 24, 2019 22:43
Keep-alive script for Udacity students using Jupyter Workspaces
import signal
from contextlib import contextmanager
import requests
DELAY = INTERVAL = 4 * 60 # interval time in seconds
MIN_DELAY = MIN_INTERVAL = 2 * 60
KEEPALIVE_URL = "https://nebula.udacity.com/api/v1/remote/keep-alive"
@willkessler
willkessler / init.el
Created December 2, 2016 17:06
init.el for react
;;; package -- Configuring emacs for React editing
;;; Last update: 11/15/2016. By Will Kessler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Set up melpa.
;; cf: http://melpa.org/#/getting-started
;;
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
@willkessler
willkessler / index.js
Created July 5, 2016 22:35 — forked from yoshuawuyts/index.js
requirebin sketch
const choo = require('choo')
const app = choo()
app.model({
state: { title: 'Set the title' },
reducers: {
update: (action, state) => ({ title: action.value })
}
})
@willkessler
willkessler / index.js
Created June 21, 2016 23:39
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const choo = require('choo')
const app = choo()
const doSomething = (action, state, send) => {
console.log('action=', action);
console.log('state=', state);
console.log('Welcome to connect4!', "\n");
var connect4Obj = {
board: new Array(), // this will be a two dimensional array
boardWidth : 7,
boardHeight : 5,
player1Piece : 'X',
player2Piece : 'O',
requiredToWin: 4,
const choo = require('choo')
const app = choo()
function view (params, state, send) {
let newView = choo.view`
<main>
<h1>${state.title}</h1>
<ul id="sortedList">
${state.theList.map(function (item) {
return choo.view`<li data-id="${item}">${item}</li>`
const choo = require('choo')
const app = choo()
function view (params, state, send) {
return choo.view`
<main>
// https://github.com/expressjs/cors
var express = require('express'), cors = require('cors'), app = express();
//var corsOptions = {
// origin: 'http://130.211.164.16:8282/'
//};
express.static.mime.define({'text/javascript': ['js']});
app.use(cors());
app.use(express.static('public'));