Skip to content

Instantly share code, notes, and snippets.

@robwhess
robwhess / commands.js
Created May 19, 2023 23:29
Cypress default E2E configuration.
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
@robwhess
robwhess / Makefile
Created April 19, 2023 18:02
Fixed Makefile for CS 480 assignment 1
all: scan
scan: scanner.c
gcc scanner.c -o scan
scanner.c: scanner.l
flex -o scanner.c scanner.l
clean:
rm -f scan scanner.c
@robwhess
robwhess / activity_settings.xml
Created February 24, 2022 19:49
Fixed starter code for CS 492 assignment 4
<?xml version="1.0" encoding="utf-8"?>
<androidx.fragment.app.FragmentContainerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/settings_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.example.android.roomyweather.ui.SettingsFragment"
tools:context=".ui.SettingsActivity" />
@robwhess
robwhess / dijkstra.md
Created November 24, 2021 21:27
Corrected Dijkstra's algorithm pseudocode for CS 261 assignment 4

Here's complete corrected pseudocode for Dijkstra's algorithm:

for every node N:
  cost[N] = infinity
  prev[N] = undefined

Q = new priority queue
insert N_start into Q with priority 0

while Q is not empty:
@robwhess
robwhess / prog1.c
Last active October 16, 2024 21:43
CS 261 Week 3 Recitation Exercise
#include <stdlib.h>
int multiply_by_2(int* p) {
*p = *p * 2;
return *p;
}
int main() {
int n = 10, x = 16, y = 32, z = 64;
int* p1 = &x;
@robwhess
robwhess / print_code_project.sh
Last active June 17, 2020 16:57
Script for printing a code project to PDF
#!/usr/bin/env bash
PROJECT_DIR="$1"
OUTPUT_FILE="$2"
if [[ -z "$PROJECT_DIR" ]] || [[ -z "$OUTPUT_FILE" ]]; then
echo "usage: `basename $0` <project_dir> <output_pdf>"
exit
fi
@robwhess
robwhess / products.json
Created February 27, 2020 00:18
Corrected data for CS 419 assignment 4
[
{"id": 1, "name": "Swedish Fish", "price": 0.01, "inStock": 2500, "photoUrl": "https://upload.wikimedia.org/wikipedia/commons/4/40/Swedish_fish.png"},
{"id": 2, "name": "Cry Baby", "price": 0.05, "inStock": 450, "photoUrl": "https://www.candywarehouse.com/item-images/125562-01_cry-baby-extra-sour-gumballs-240-piece-tub.jpg"},
{"id": 3, "name": "Atomic Fireball", "price": 0.05, "inStock": 280, "photoUrl": "https://cdn.shopify.com/s/files/1/0004/8132/9204/products/atomic_fireballs_bulk_7_1024x1024.jpg"},
{"id": 4, "name": "Root Beer Barrel", "price": 0.05, "inStock": 200, "photoUrl": "https://nuts.com/images/rackcdn/ed910ae2d60f0d25bcb8-80550f96b5feb12604f4f720bfefb46d.ssl.cf1.rackcdn.com/f6ae7d27ce0d652d.cro-OLlV7MKo-zoom.jpg"},
{"id": 5, "name": "Tootsie Roll (small)", "price": 0.01, "inStock": 1250, "photoUrl": "https://cdn.shopify.com/s/files/1/0972/7116/products/all-city-candy-tootsie-roll-midgees-bank-4-oz-novelty-tootsie-roll-industries-350643_600x.jpg"},
{"id": 6, "name": "Sour Patch Kids"
@robwhess
robwhess / .gitignore
Created November 8, 2019 01:09
CS 261 Assignment 3 with Extra Credit
*.o
test_bst
test_bst_iterator
*.dSYM
@robwhess
robwhess / .gitignore
Last active October 23, 2019 21:08
CS 261 Assignment 2 with Extra Credit
*.o
test_queue
test_stack
test_queue_from_stacks
*.dSYM
@robwhess
robwhess / openapi.yaml
Last active April 29, 2024 21:57
Tarpaulin OpenAPI Specification
openapi: 3.0.3
info:
version: 1.0.0
title: The Tarpaulin API
description: API for an "alternative" to Canvas.
paths:
/users:
post:
summary: Create a new User.