Skip to content

Instantly share code, notes, and snippets.

View rtgibbons's full-sized avatar

Ryan Gibbons rtgibbons

View GitHub Profile
@rtgibbons
rtgibbons / userChrome.css
Created April 17, 2014 18:18
Using FF 29+ with Classic Theme Restorer Square Tabs (australized), updating bookmark bar to match
/* ----- BOOKMARK BUTTONS ----- */
toolbarbutton.bookmark-item:not(.subviewbutton):not(#bookmarks-menu-button),
#personal-bookmarks[cui-areatype="toolbar"]:not([overflowedItem=true]) > #bookmarks-toolbar-placeholder {
border: 0;
border-radius: 2.5px !important;
padding: 1px 8px !important;
margin: 0 0 1px;
font-weight: bold;
color: rgb(85, 85, 85);
@rtgibbons
rtgibbons / logger.js
Created April 29, 2014 16:51
another winston logger helper
var winston = require('winston');
var logger = new(winston.Logger)({
transports: [
new(winston.transports.Console)({
level: 'debug',
colorize: true,
timestamp: true
}),
new winston.transports.File({
@rtgibbons
rtgibbons / ap.sh
Created November 24, 2014 17:58
Apache memory usage
ps -ylC apache2 | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
Array
(
[Location] => Array
(
[doc_first_name] => Ryan
[doc_last_name] => Gibbons
[practice_name] => Ryan Gibbons
[address_1] => 9999 Ridglea Place
[address_2] => Suite 408
[city] => Fort Worth
@rtgibbons
rtgibbons / balisong-gem-backports.patch
Created March 10, 2011 05:37
Including backports gem for ruby_18 platforms
diff --git a/Gemfile b/Gemfile
index ec7a4ff..e86cc9d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -10,6 +10,8 @@ gem 'mime-types', :require => 'mime/types'
gem 'rdiscount'
gem 'RedCloth'
+gem 'backports', :platforms => 'ruby_18'
+
@rtgibbons
rtgibbons / phparray.php
Created June 1, 2011 05:36
Simple assocaitive array
<?php
var $contactTimeOptions = array(
'morning' => 'morning',
'afternoon' => 'afternoon',
'evening' => 'evening'
);
?>
@rtgibbons
rtgibbons / paulify.php
Created June 3, 2011 02:25
download random image
<?php
$files = array();
$path = 'i/s/';
if ( $dir = opendir( $path ) ) {
while ( false !== ( $file = readdir( $dir ) ) ){
switch( mime_content_type( $path.$file ) ) {
case 'image/jpeg':
case 'image/jpg':
@rtgibbons
rtgibbons / macvim.rb
Created September 17, 2011 01:44
Alloy's MacVim (File Browser)
require 'formula'
class Macvim < Formula
homepage 'http://code.google.com/p/macvim/'
version '7.3-61'
head 'https://github.com/alloy/macvim.git', :branch => 'split-browser'
def options
[
# Building custom icons fails for many users, so off by default.
@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: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;
}