Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathaniel Watts thewatts

  • Conway, AR
View GitHub Profile
View gem_make.out
/Users/watts/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
/Users/watts/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
/Users/watts/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
/Users/watts/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
/Users/watts/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
/Users/watts/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
/Users/watts/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
View testing.rb
class Person
attr_reader :name
def initialize(name)
@name = name
end
def shout_name
@name.upcase
end
View tm2iterm.rb
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
@thewatts
thewatts / rails.yml
Last active Dec 30, 2015
Teamocil Rails Sample
View rails.yml
session:
name: "rails"
windows:
- name: "CODE"
layout: 8590,178x45,0,0{114x45,0,0,3,63x45,115,0,4}
panes:
- cmd: "vim"
focus: true
- cmd: "guard"
- name: "SERVER"
@thewatts
thewatts / mamp-virtualhosts.md
Last active Sep 4, 2018
This is a quick gist for setting up simple Virtual Hosts with MAMP
View mamp-virtualhosts.md

Setting Up MAMP to have Virtual Hosts.

  • This will work with MAMP 2.1.1 on OSX Mountain Lion, no guarantee otherwise.
  • Virtual Hosts allow you to use readable URLs in your address bar to point to your local web projects instead of having to type "localhost:8888", etc.

Setting Up Mamp Application

  1. Install MAMP mamp.info
  2. Launch Mamp & click on Preferences
  3. Click the Ports tab and click the Set to default Apache and MySQL ports button.
  • This will set your Apache Port to 80 and your MySQL Port to 3306
  1. Click the Apache tab to setup your Document Root
@thewatts
thewatts / db_prod2local_alfredapp.sql
Created Oct 14, 2012
Snippets to use with AlfredApp to import your production database into your local database, and then change your production URL values to your local URL values in WordPress.
View db_prod2local_alfredapp.sql
-- This file will be used in the snippet below.
-- This is the name of your local database
USE local_db
-- Replacing all instances of your production URL with your local URL
UPDATE wp_options SET option_value = replace(option_value, 'http://sitename.com', 'http://sitename.local')
WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = REPLACE (guid, 'http://sitename.com', 'http://sitename.local');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://sitename.com', 'http://sitename.local');
You can’t perform that action at this time.