Skip to content

Instantly share code, notes, and snippets.

View snelson's full-sized avatar

Scotty Nelson snelson

View GitHub Profile
@snelson
snelson / caveatPatchor.js
Created September 27, 2011 18:29
Propane Hacks
Object.extend(Campfire.Message.prototype, {
addAvatar: function() {
if (this.actsLikeTextMessage()) {
var author = this.authorElement();
var avatar = '';
if (author.visible()) {
author.hide();
if (this.bodyCell.select('strong').length === 0) {
//this.bodyCell.insert({top: '<strong style="color:#333;">'+author.textContent+'</strong><br>'});
@snelson
snelson / capybara_save_and_open_page.rb
Created August 13, 2011 21:43
Rails 3.1 Capybara save_and_open_page asset pipeline support
if Rails.version.to_f >= 3.1 and Rails.application.config.assets.enabled
require 'capybara/util/save_and_open_page'
module Capybara
class << self
def save_page(html, file_name=nil)
rewrite_css_assets
save_page_html(html, file_name)
end
protected
" tir_#352030 color scheme
" Based on ir_#352030 from: http://blog.infinitered.com/entries/show/8
" adds 256 color console support
" changed WildMenu color to be the same as PMenuSel
set background=dark
hi clear
if exists("syntax_on")
syntax reset
@snelson
snelson / interfaces
Created March 7, 2010 22:04
OpenVPN on Ubuntu 9.10 Server and Rackspace Cloud Server
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
# Uncomment this and configure after the system has booted for the first time
auto eth0
iface eth0 inet static
VBoxManage setextradata ubuntu-dev "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/Protocol" TCP
VBoxManage setextradata ubuntu-dev "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/GuestPort" 80
VBoxManage setextradata ubuntu-dev "VBoxInternal/Devices/e1000/0/LUN#0/Config/guesthttp/HostPort" 8080
VBoxManage setextradata ubuntu-dev "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/Protocol" TCP
VBoxManage setextradata ubuntu-dev "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/GuestPort" 22
VBoxManage setextradata ubuntu-dev "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/HostPort" 2222
<?php
class CampfireAPI
{
//Campfire API variables
//MODIFY THESE FOR YOUR ACCOUNT
public $url = ''; //The full URL to your account. ex: http://[account].campfirenow.com
public $username = ''; //The Campfire user you want to log messages as. (usually an email address)
public $password = ''; //The users Campfire password
public $roomid;