Skip to content

Instantly share code, notes, and snippets.

View alexpatel's full-sized avatar

Alex Patel alexpatel

View GitHub Profile
@alexpatel
alexpatel / os161-a4-buildmult.sh
Created May 8, 2017 01:10
Build a set of ASST4 OS/161 kernels
#!/usr/bin/env bash
# Build a set of ASST4 OS/161 kernels
BUILD_ROOT="$(pwd)/build"
for DIR in repos/a4/*; do
pushd $DIR
# download code
@alexpatel
alexpatel / Vagrantfile-os161.rb
Created March 24, 2017 14:02
Vagrantfile for hacking on OS/161
# -*- mode: ruby -*-
Vagrant.configure("2") do |config|
# Ubuntu 14.04
config.vm.box = "ubuntu/trusty64"
# sync host repository with ~/cs161/os161 on virtual machine
config.vm.synced_folder ".", "/home/vagrant/cs161/os161", :owner=> 'vagrant', :group=> 'vagrant'
# forward host SSH agent
@alexpatel
alexpatel / os161-a3-precommit
Last active May 8, 2017 01:12
Pre-commit hooks for OS/161 VM testing
#!/bin/bash
#
# This pre-commit hook builds A3 and then runs a bunch of tests against it.
#
# To use this script copy it to .git/hooks/pre-commit and make it executable.
set -e
pushd "$HOME/cs161/os161/kern/compile/ASST3"
bmake -j4 && bmake install -s
@alexpatel
alexpatel / Vagrantfile-strace.rb
Last active March 16, 2017 16:32
Vagrantfile for hacking on strace
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
#!/usr/bin/env bash
# Submit programming assignment submissions to the MOSS plagiarism detection
# server.
if [ $BASH_VERSINFO -lt 4 ];
then
echo "Expected bash 4.0.0 or later, found $BASH_VERSION"
exit 1
fi
@alexpatel
alexpatel / URLResolution_DjangoGSoC2015.md
Created April 3, 2015 16:12
Improved URL Resolution for Django - Proposal, Google Summer of Code 2015

Improved URL Resolution

Contents

  1. Abstract
  2. Current Infrastructure
  3. Motivation
  4. The URLResolver API
    1. Interface
  5. Usage
@alexpatel
alexpatel / harvard-club-scraper.py
Last active August 29, 2015 14:05
Scrapes the contact information for student and faculty contacts from the Harvard Student Organizations site (http://osl.fas.harvard.edu/student-organizations)
#!/usr/bin/env python
''' Script to scrape contact information from Harvard Student Organizations site
(http://osl.fas.harvard.edu/student-organizations).
Run with 'python /path/to/scraper'.
-- License --
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by