View cs255.user.js
// ==UserScript==
// @namespace CS255
// @name CS255
// @description CS255 - Assignment 1
// @version 1.1
// @include*
// @include*
// @exclude*
import urllib2
from bs4 import BeautifulSoup
import requests
import re
import urllib
import sys
import os
import tornado.ioloop
import tornado.web
settings = {
"login_url": "/login",
"xsrf_cookies": True,
"cookie_secret":"53CR3T", #change in prod... duh!
# To get the data
# curl -s -O ; unzip -q -o top-1m.csv ; head -1000 top-1m.csv | cut -d, -f2 | cut -d/ -f1 > topsites.txt
# Process Data
cat topsites.txt | while read line
echo $line
count=$( wget -T 30 -qO- $line | grep -c "><font class=accessdeniedcategoryfont>")
View lookoutside.js
//Script which takes the current APOD photo and shows it in an svg along with a #LookOutside reminder
$.get( "", function(data) {
var url = data.url;
var bg = document.createElementNS('','image');
bg.setAttributeNS(null, 'visibility', 'visible');
View idiotpoweredscripting.js
// KuNG FU JS v.1
//alert('Photo Uploaded! Please wait 1-2 minutes without leaving this page until we process your picture!');
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
View html_to_text.cpp
Basically takes a file with HTML numbers as input and outputs the converted text to another file.
HTML Numbers is:
A &#65;
B &#65;
Mainly did this to decrypt(?) lyrics from lyrics sites like which allow only viewing but not copying of lyrics (The whole GraceNote license thing) eg. ... source code of the page shows the lyrics in HTML numbers.
Compiled with Codeblocks v. 8.02
View physicist_party
One day, all of the world's famous physicists decided to get together for a party (ok, there were some non-physicists too who crashed the party). Fortunately, the doorman was a grad student, and able to observe some of the guests...
Everyone gravitated toward Newton, but he just kept moving around at a constant velocity and showed no reaction.
Einstein thought it was a relatively good time.
Coulomb got a real charge out of the whole thing.
Cauchy, being the mathematician, still managed to integrate well with everyone.
Thompson enjoyed the plum pudding.
Pauli came late, but was mostly excluded from things, so he split.
Pascal was under too much pressure to enjoy himself.
Ohm spent most of the time resisting Ampere's opinions on current events.
View magic
# Magic
# Magic data for file(1) command.
# Machine-generated from src/cmd/file/magdir/*; edit there only!
# Format is described in magic(files), where:
# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID.
# Localstuff: file(1) magic for locally observed files
# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $
View getresults.php
//Stupid Univ. didn't release results, instead each student had to enter seat number to get his result!
// Wrote this script to automate the process and get the results of students from Seat No. 1-999 (Think that's the
// complete range of seat numbers)
// You end up with a seatno.html files for all seat nos in the range 1-999 ... Result of seat no. 'a' is 'a.html'
// Ran this on Ubuntu running LAMPP and it worked as expected! Nothing platform specific, so should work for you too!
// Edit if you need to find results of another semester (or if u are disgusted by the shitty code I've written and
//want to improve the code!)
$id = '4'; //Was a hidden field... Dunno what it is for