Skip to content

Instantly share code, notes, and snippets.

View codejoust's full-sized avatar

Iain codejoust

View GitHub Profile
#!/usr/bin/ruby
class Person
def initialize(name, email)
@name, @email = name, email.gsub('|', '').gsub('*','.')
end
def show_name
@name
end
def visit(site)
if (@data["portfolio"].match(/http:\/\//) && system("firefox #{site}"))
@codejoust
codejoust / Domain Replacement for Gmail.user.js
Created October 17, 2009 04:20
Gmail Domain Replacement - Switcher
// ==UserScript==
// @name Gmail Replace Domain
// @author http://codejoust.com
// @namespace http://mail.google.com/
// @description example script to alert "Hello world!" on every page
// @include http://mail.google.com/*
// ==/UserScript==
var your_domain = 'yourdomain.com'; //Your domain to change.
var canvas_frame = document.getElementById('canvas_frame').contentWindow.document; //The Canvas Frame in Gmail
var user_id = canvas_frame.getElementById('guser').getElementsByTagName('b')[0]; //Get the child b element containing username
@codejoust
codejoust / PHP Config Class.php
Created October 4, 2009 16:16
PHP5 Config Class.
<?php
class Config{
private static $_data;
private static $_instance;
public function __construct() { }
public static function getInstance(){
/* command "Bible" */
CmdUtils.CreateCommand({
name: "bible",
icon: "http://www.biblegateway.com/favicon.ico",
homepage: "http://www.biblegateway.com/",
author: { name: "CodeJoust", email: "http://codejoust.com/contact"},
license: "GPL",
description: "Search BibleGateway",
help: "BibleGateway: General Search",
takes: {"input": noun_arb_text},