Print Your Stuff from the Terminal with utprint.py

Recently — in the spring of 2016, I believe — the UT Austin libraries rolled out a new printing system that allows students and staff to upload documents via a web interface. This was a huge deal to me because previously, I had to get off my laptop and sign in to a library computer to print things.

Functional but frustratingly slow.

It works well enough, but as is always the case for university computer systems, it’s a little cumbersome to use. My typical workflow looked like this:

  1. Log in
  2. Upload my essay
  3. Set my standard printing options: no color, duplex

That works out to about ten clicks and a password manager access. The horror! We can do much better. We have the technology.

Over the last two weekends, I put together a Python script that can send documents straight from the command line. It stays authenticated for two weeks at a time and there’s a configuration file to specify preferred printing settings.

$ ./utprint.py ~/Documents/utcs.pdf
Print settings:
  - Full color
  - Simplex
  - Copies: 1
  - Page range: all
Logging in with saved token ... done
Uploading utcs.pdf ... done
Processing ... done
Finances:
    Available balance: $1.16
    Cost to print:     $0.42

    Remaining balance: $0.74

I’m sure it will prove useful to all the… one… UT Austin students who are handy with a terminal and do a lot of writing. Find it on GitHub.

Prototype Sustainable Map for the UT Austin Campus

I usually keep my writings on my personal blog and The Daily Texan separate, but I’ll make an exception here: this post is an addendum to my recent opinion column on sustainability and the UT campus map.

Here’s how I think the campus map should look like. I took the visitor map from the Parking and Transportation Services website and added the UT shuttle campus circulators and some suggested bicycling routes.

(I’m not a huge fan of the segregated bike lanes on Guadalupe and Dean Keeton, but they are depicted for posterity’s sake.)

If we want to claim the mantle of a sustainable campus, a map like this is just plain common sense.

Polymathic Scholars Transit Talk

I have been meaning to publish this for awhile, but it sat on my back burner.

On March 3, I gave a talk to my fellow Polymathic Scholars on the importance public transportation. It’s sort of a hybrid presentation that explains both how to use transit and also how it’s planned.

Check out the slides here.

Hacking Piazza with Cross-Site Scripting

Piazza is a free classroom discussion service marketed for science and mathematics classes. It is best described as a hybrid wiki and forum; students can post questions, and other students can collaborate on answers. Like WordPress, content can be formatted with a rich-text editor or with plain HTML with a restricted set of features. Piazza’s distinguishing feature is the ability to post anonymously, which it claims makes underrepresented groups in the sciences more comfortable with interacting with the class. At UT, the computer science department makes extensive use of Piazza for most of its classes.

Piazza is primarily accessed through the web interface on piazza.com. Of great interest, there is also a “lite” web interface designed for mobile devices and accessible browsers at piazza.com/lite. I will demonstrate that Piazza is susceptible to common client-side web attacks, such as cross-site scripting, as a result of its reliance on web apps. (There are also native iOS and Android apps, but they are awful, and nobody uses them.) Continue reading “Hacking Piazza with Cross-Site Scripting”

The Student Ghetto

Thousands of University of Texas students, myself among them, live in the crowded West Campus neighborhood adjacent to the university. The insatiable demand for housing close to campus has spurred a construction spree of high-rise apartment buildings catered to affluent student residents. Tiny apartments fit two, three, four, or even five students, usually randomly matched by management. To cut costs, many split bedrooms, doubling the number of roommates. The newer student apartments have an expensive look to them, with large, gleaming windows and picturesque balconies. Luxury amenities such as pools, patios, and multi-story garage parking come standard.

Make no mistake; despite its increasingly upscale appearance, West Campus contains not young professionals and urban gentrifiers but rowdy college students. Explore the neighborhood on a given weeknight and you’ll find roving gangs of them looking to have a good time. The streets are filled with noise from loud conversations, party music, and the shouts of drunken students, emanating from the rooftops and balconies of apartments that collect multiple thousands of dollars of rent. Trash, in the form of beer bottles, plastic drinking cups, and even condoms, is everywhere. Austin police officers shuttle between frat houses and cooperative student living homes – the hardest partiers, and hence the biggest offenders – responding to noise complaints and stopping the most outrageous gatherings. Continue reading “The Student Ghetto”