Skip to content

Instantly share code, notes, and snippets.

View rtgibbons's full-sized avatar

Ryan Gibbons rtgibbons

View GitHub Profile
'initialize': function() {
this.model = WordModel;
this.url = App.config.get('servicesUrl') + 'services/words/enabled';
this.populate();
},
@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
@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 / 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 / post_test.js
Last active October 1, 2015 19:26
mocha test on Keystone Model
process.env.NODE_ENV = process.env.NODE_ENV || 'test';
require('dotenv').load();
var keystone = require('keystone');
var chai = require('chai');
var dbURI = process.env.MONGO_URL
keystone.init({
'name': 'Post Model Test',
's3 config': {} //has to be set, but isn't used in our models
@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 / 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: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 / 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 / mvim
Created November 23, 2011 20:41
mvim for vim-coca
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).