Skip to content

Instantly share code, notes, and snippets.

@ajbogh
ajbogh / FixVPN
Created December 24, 2014 07:30
FixVPN routes all traffic through a local interface, except for VPN's IPs, allowing internet access.
#!/bin/bash
# Notes: use the route command to determine your device name and make changes below.
# Run this script only after you connect to the VPN.
##### EDIT BELOW #####
NETWORK_DEVICE='wlan0'
##### END EDITABLE SECTION #####
if ! hash gksu 2>/dev/null; then
@ajbogh
ajbogh / Bees.js
Created October 29, 2013 22:32
Attack Bees
//this is a fun script that tracks the mouse position and attacks the mouse with Bees.
//use in a simple HTML file or paste into jsfiddle.net's Javascript panel to test.
var bees = [];
var numbees = 30;
while(bees.length < numbees){
bees[bees.length] = new Bee();
}
@ajbogh
ajbogh / gist:1452455
Created December 9, 2011 17:20
Show All Alt Tags
/* Shows all image alt text or title tags for a specified time.
* Title is the preferred image attribute in this script, falls back to alt.
*
* USAGE:
* Create a bookmark in your browser.
* Add the url (note, type out 'javascript:' before pasting code.):
* javascript:[paste code below]
* Add the bookmark to your bookmark bar, if not done already.
* You can also paste the code in your address bar like so:
* javascript:[paste code below]
CmdUtils.CreateCommand({
names: ["reddit"],
icon: "http://reddit.com/static/favicon.ico",
homepage: "http://www.opencodeproject.com",
arguments: [
{role: "object", nountype: noun_arb_text}],
description: "Submits the page to reddit.",
author: { name: "Allan Bogh", email: "[email protected]"},
license: "MPL,GPL",
preview: function reddit_preview(pblock, {object: {html}}) {