Skip to content

Instantly share code, notes, and snippets.

View bollwyvl's full-sized avatar

Nicholas Bollweg bollwyvl

View GitHub Profile
CmdUtils.CreateCommand({
name: "lmgtfy",
takes: {"words to google": noun_arb_text},
icon: "http://letmegooglethatforyou.com/favicon.ico",
description: "Replaces the selected words with a <a href=\"http://www.tinyurl.com\">TinyUrl</a> of the <a href=\"\">Let Me Google That For You</a> link",
preview: function( pblock, urlToShorten ){
pblock.innerHTML = "Replaces the selected URL with a tiny LMGTFY url.";
var baseUrl = "http://tinyurl.com/api-create.php?url=http://letmegooglethatforyou.com/?q=";
pblock.innerHTML = "Replaces the selected URL with ",
jQuery.get( baseUrl + urlencode(urlToShorten.text), function( tinyUrl ) {
@bollwyvl
bollwyvl / LetMeGoogleThatForYou.js
Created January 9, 2009 18:03
A Ubiquity command for Let Me Google That For You
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Legacy version of the LetMeGoogleThatForYou *
* Ubiquity script compatible with Ubiquity <0.5. *
* This version will not be updated. *
* The Parser 2 API version is available at *
* http://gist.github.com/144222 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CmdUtils.CreateCommand({
name: "lmgtfy",
@bollwyvl
bollwyvl / LetMeGoogleThatForYou2.js
Created July 10, 2009 03:42
A Ubiquity 0.5+ command for Let Me Google That For You
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Parser 2 API version of the LetMeGoogleThatForYou *
* Ubiquity script compatible with Ubiquity 0.5+. *
* The Legacy parser version is available at *
* http://gist.github.com/45201 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var icon = "http://letmegooglethatforyou.com/favicon.ico";
var tu_desc = "<a href=\"http://www.tinyurl.com\">TinyUrl</a>";
var lmg_desc = "<a href=\"http://lmgtfy.com\">Let Me Google That For You</a>";
@bollwyvl
bollwyvl / authen_msad.py
Created July 29, 2009 20:07
A Python port of Perl's Apache::AuthenMSAD
"""
authen_msad
A port of Perl's Apache::AuthenMSAD
Takes advantage of Microsoft Active Directory allowing a user to be verified
with 'user@domain' instead of searching for the distinguished name.
To merge as seamlessly as possible with existing systems (i.e. SharePoint,
etc.) munge the incoming "domain\user" into "user@domain".
import vlc, sys, time, win32gui, random
"""
from http://www.s-anand.net/blog/automating-powerpoint-with-python/
"""
class Treemap:
def __init__(self, width, height, data, draw):
'''Treemap(width, height, data, fn) '''
self.x, self.y = 0.0, 0.0
self.scale = (float(width * height) / self.get(data, sum)) ** 0.5
c:\Python25\Scripts\ipython.exe pytreevideo.py "http://vehicle.berkeley.edu/~allison/c3uv_video/CanalFollow2005.avi" "http://vehicle.berkeley.edu/~allison/c3uv_video/balloon_tracking.avi" "http://vehicle.berkeley.edu/~allison/c3uv_video/rf2004.avi"
// ==UserScript==
// @name ritzpix scrape
// @namespace ritzpix
// @include http://www.ritzpix.com/net/Albums/ListImages.aspx
// ==/UserScript==
// Add jQuery
var GM_JQ = document.createElement('script');
GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
GM_JQ.type = 'text/javascript';
from pylab import *
'''
COST_MONTE_CARLO performs a Monte Carlo simulation of total mission cost
Costs are given in $M
pmse = Project Management/System Engineering
fs = Flight System
inst = Instruments
mos = Mission Operations System
nt = New Technology
epo = Education & Public Outreach
@bollwyvl
bollwyvl / cleanup_outlook_web_app.user.js
Created June 16, 2010 14:16
Removes branding from OWA to give you more screen real estate for email, calendar contacts and tasks
// ==UserScript==
// @name Cleanup Outlook Web App
// @namespace cowa
// @description Removes branding from OWA to give you more screen real estate for email, calendar contacts and tasks
// @include https://mail.*/OWA/
// @include https://mail.*/OWA/#
// @include https://mail.*/OWA
// @include https://mail.*/?modurl=0
// @include https://mail.*/?modurl=0
#!/bin/bash
sudo mkdir /opt/magicdraw
sudo chown -R gtpmasevm:gtpmasevm /opt/magicdraw