Skip to content

Instantly share code, notes, and snippets.

@robwhess
robwhess / gh_classroom_collect.py
Last active March 13, 2023 18:03
Script to collect a set of assignments from GitHub Classroom.
#!/user/bin/env python
#
# This is a simple python script to clone all of the repositories for an
# assignment managed via GitHub Classroom. It has a dependency on the
# requests module, so to use it, you must:
#
# pip install requests
#
# You can run the script with the '-h' option to get info on its usage.
#include <iostream>
#include <algorithm>
struct state {
std::string name;
float unemployed_2007;
float unemployed_2015;
};
bool cmp_unemploy_asc(struct state lhs, struct state rhs) {
@robwhess
robwhess / openapi.yaml
Created April 16, 2018 20:19
OpenAPI Specification for CS 493 Example API
openapi: 3.0.1
info:
version: 1.0.0
title: Book-a-Place API
description: A simple API for an Airbnb-like application.
paths:
/lodgings:
get:
summary: Fetch a list of lodgings
@robwhess
robwhess / test.c
Last active September 26, 2019 16:50
Test file for CS 261 recitation 1
#include <stdio.h>
void foo(int x);
int main(int argc, char** argv) {
char* name = "PUT YOUR NAME HERE";
printf("My name is: %s\n", name);
foo(2);
foo(4);
foo(2 + 4);
@robwhess
robwhess / Businesses API.postman_collection.json
Created May 9, 2019 18:45
Postman collection for testing businesses API
{
"info": {
"_postman_id": "bb528654-b92d-4752-8acd-0b3c2b951d0f",
"name": "Businesses API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Businesses",
"item": [
@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.
@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 / .gitignore
Created November 8, 2019 01:09
CS 261 Assignment 3 with Extra Credit
*.o
test_bst
test_bst_iterator
*.dSYM
@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 / 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