Skip to content

Instantly share code, notes, and snippets.

View rtgibbons's full-sized avatar

Ryan Gibbons rtgibbons

View GitHub Profile
@rtgibbons
rtgibbons / gist:1436846
Created December 6, 2011 05:09
Google's new toolbar
document.cookie="PREF=ID=03fd476a699d6487:U=88e8716486ff1e5d:FF=0:LD=en:CR=2:TM=1322688084:LM=1322688085:S=McEsyvcXKMiVfGds; path=/; domain=.google.com";window.location.reload();
@rtgibbons
rtgibbons / gist:1449072
Created December 8, 2011 22:50
Vagrant errors
/Users/ryangs/.rvm/gems/ruby-1.9.2-p290@global/gems/virtualbox-0.9.2/lib/virtualbox/com/implementer/ffi.rb:106:in `call_and_check': Error in API call to get_network_adapter: 2147942487 (VirtualBox::Exceptions::InvalidArgException)
from /Users/ryangs/.rvm/gems/ruby-1.9.2-p290@global/gems/virtualbox-0.9.2/lib/virtualbox/com/implementer/ffi.rb:80:in `call_vtbl_function'
from /Users/ryangs/.rvm/gems/ruby-1.9.2-p290@global/gems/virtualbox-0.9.2/lib/virtualbox/com/implementer/ffi.rb:61:in `call_function'
from /Users/ryangs/.rvm/gems/ruby-1.9.2-p290@global/gems/virtualbox-0.9.2/lib/virtualbox/com/abstract_interface.rb:145:in `call_function'
from /Users/ryangs/.rvm/gems/ruby-1.9.2-p290@global/gems/virtualbox-0.9.2/lib/virtualbox/com/abstract_interface.rb:62:in `block in function'
from /Users/ryangs/.rvm/gems/ruby-1.9.2-p290@global/gems/virtualbox-0.9.2/lib/virtualbox/network_adapter.rb:79:in `block in populate_relationship'
from /Users/ryangs/.rvm/gems/ruby-1.9.2-p290@global/gems/virtualbox-0.9.2/lib/virtualbox
@rtgibbons
rtgibbons / definition.rb
Created January 25, 2012 02:30 — forked from nemonik/definition.rb
My CentOS-5.7-x86_64 Basebox Template
Veewee::Session.declare({
:cpu_count => '1', :memory_size=> '384',
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', :ioapic => 'on', :pae => 'on',
:os_type_id => 'RedHat_64',
:iso_file => "CentOS-5.7-x86_64-bin-DVD-1of2.iso",
:iso_src => "http://mirror.steadfast.net/centos/5.7/isos/x86_64/CentOS-5.7-x86_64-bin-DVD-1of2.iso",
:iso_md5 => "55eadec0a6e87c5f2883f734d43fdb58",
:iso_download_timeout => 1000,
:boot_wait => "10", :boot_cmd_sequence => [ 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>' ],
:kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
@rtgibbons
rtgibbons / gist:2007727
Created March 9, 2012 17:47
CSS: Image Replacement without text-indent
.ir {
border:0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color:transparent;
}
@rtgibbons
rtgibbons / VBoxReloadKext.sh
Created March 12, 2012 19:51 — forked from timdream/VBoxReloadKext.sh
Script: reload VirtualBox kernel extension in Mac OS X
#!/bin/bash
unload() {
kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB
kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv
}
load() {
@rtgibbons
rtgibbons / logger.rb
Created May 31, 2012 18:57
Webistrano's hide_passwords() method
# replaces deployment passwords in the message by 'XXXXX'
def hide_passwords(message)
scrambled_message = message
# scramble non-prompt configs
deployment.stage.non_prompt_configurations.each do |config|
scrambled_message.gsub!(config.value, "XXXXXXXX") if ( config.name.match(/password/) && !config.value.to_s.strip.blank? )
end
# scramble prompt configs
@rtgibbons
rtgibbons / hideSubsequentNick.js
Created July 5, 2012 04:51
JS Snippet to hide subsequent nick's in Textual
var $bodyHome = $('#body_home'),
$newLine,
$prevLine,
$newLineNick;
$bodyHome.on('DOMSubtreeModified', function() {
$newLine = $bodyHome.find('.line').last();
$prevLine = $newLine.prev();
$newLineNick = $newLine.find('.sender').attr('nick');
if ( $newLineNick === $prevLine.find('.sender').attr('nick')) {
@rtgibbons
rtgibbons / chat-wish-list.md
Created July 15, 2012 21:52
Chat wish list

Why

I hate Skype, but it has become un-official default chat of many businesses and developers. Because it is free, secure and provides voice and video. But Skype is missing so many other features that make it annoying to use.

Existing Options

  • Skype
  • Campfire
  • HipChat
  • Grove.io
'initialize': function() {
this.model = WordModel;
this.url = App.config.get('servicesUrl') + 'services/words/enabled';
this.populate();
},
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{request_uri} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]