Skip to content

Instantly share code, notes, and snippets.

Arron Mabrey arronmabrey

Block or report user

Report or block arronmabrey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
arronmabrey / gist:632843
Created Oct 18, 2010
rvm, zsh and textmate be friends
View gist:632843
# Via
#!/usr/bin/env zsh
source ~/.rvm/scripts/rvm
if [[ -s "${TM_PROJECT_DIRECTORY}/.rvmrc" ]]
source "${TM_PROJECT_DIRECTORY}/.rvmrc"
arronmabrey / gist:700388
Created Nov 15, 2010
Email validation in Ruby On Rails 3 or Active model without regexp
View gist:700388
# via
class User < ActiveRecord::Base
validates :email, :presence => true, :email => true
# Just put a file in app/validators/email_validator.rb
View WEBrick.rb
#!/usr/bin/env ruby
require 'optparse'
require 'webrick'
class NonCachingFileHandler < WEBrick::HTTPServlet::FileHandler
def prevent_caching(res)
res['ETag'] = nil
res['Last-Modified'] = + 100**4
res['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'
res['Pragma'] = 'no-cache'
View gist:1078983
rvm debug
/Users/arron/.rvm/scripts/info: line 5: /base: No such file or directory
/Users/arron/.rvm/scripts/info: line 6: /version: No such file or directory
/Users/arron/.rvm/scripts/info: line 176: /match: No such file or directory
/Users/arron/.rvm/scripts/info: line 195: __rvm_become: command not found
/Users/arron/.rvm/scripts/info: line 197: __rvm_environment_identifier: command not found
View middleman-transmitsync.rb
module Middleman::Features::TransmitSync
class << self
def registered(app)
app.after_build do
project_transmitsync_favorite_name = app.transmit_sync_favorite
macruby_eval = <<-macrubyEval
framework 'ScriptingBridge'
@transmit = SBApplication.applicationWithBundleIdentifier('com.panic.Transmit')
@transmitsync_favorite_name = ARGV.join('')
@transmitsync_favorite = false
View gist:1519152
View gist:1955553
(function (window, document, undefined) {
var j = true,
o = null,
q = false;
function r(a) {
return function (c) {
this[a] = c
arronmabrey / hidpi.txt
Created Aug 11, 2012 — forked from simX/hidpi.txt
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
View hidpi.txt
sudo defaults write /Library/Preferences/ DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/ DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
View gist:5505503

found at:

Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband

  1. Unplug coax cable from Motorola
  2. Hold down the white reset button on the back panel with a pen for 30s.  This resets all settings to factory defaults. The modem will be auto-reconfigured once you plug in the coax cable.
  3. When modem is back on plug in a computer with an Ethernet cable into the modem.
  4. Connect to and login with “admin” / “motorola”
  5. Now you will make some changes:
    • Wireless -> Primary Network -> Disabled
View gist:5638883
setData: -> $.each, (key, value) => @data[key] = value
You can’t perform that action at this time.