Skip to content

Instantly share code, notes, and snippets.

Done

DONE:

  # NEW 20040713 /images and /banners are local
  # CHANGED 20060123 added feeds-local
  # CHANGED 20060216 added css & js
  # CHANGED 20080324 blog (new) is local
  # 20080701 For-pay demo is local

if ( $uri =~ m#^/(images|banners|feeds-local|css|js|blog|w3c)/# ) {

Photohop Migration Plan

This plan is to perform the site migration from Photohop's current environment on Linode to the one on Engine Yard.

Task List

  1. Lower TTL for domain (Photohop)
  2. Put up maintentance page for existing site (Photohop)
  3. Take fresh database dump from live site (Photohop)
  4. Load DB dump into Engine Yard (EY)
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
FROM php:5.5-apache
RUN apt-get -qy update && apt-get -qy install php5-mhash php5-curl libmcrypt-dev libpng12-dev
RUN docker-php-ext-install mcrypt mysql gd pdo_mysql
COPY . /var/www/html/
WORKDIR /var/www/html
RUN chown -R www-data .
RUN find . -type d -exec chmod 700 {} \;
RUN find . -type f -exec chmod 600 {} \;
" Vim color file
" Converted from Textmate theme Sunburst using Coloration v0.2.2 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
padrino rake spec -e test
=> Executing Rake spec ...
=> Located unlocked Gemfile for test
PostsController
- should be successful
Account Model
- can be created (FAILED - 1)
@emachnic
emachnic / application.haml
Created February 1, 2011 16:52
Refactoring 'if' statements in RubyFreelancers
/ Before refactoring
#freelancer_nav
- if freelancer_signed_in?
= link_to "Dashboard", '/freelancers/dashboard'
- if current_freelancer.profile.nil?
= link_to "New Profile", new_profile_path
- else
= link_to "My Profile", current_freelancer.profile
= link_to "Sign out", destroy_freelancer_session_path
- elsif admin_signed_in?
@emachnic
emachnic / Showoff 1.9.2 Stack Trace
Created March 6, 2011 04:40
Can't get Showoff to work using Ruby 1.9.2
Evan-Machnics-MacBook-Pro:showoff-wrangling-git evan$ showoff serve
== Sinatra/1.1.3 has taken the stage on 9090 for development with backup from WEBrick
[2011-03-05 23:38:03] INFO WEBrick 1.3.1
[2011-03-05 23:38:03] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.7.1]
[2011-03-05 23:38:03] INFO WEBrick::HTTPServer#start: pid=2553 port=9090
/Users/evan/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.3.4
/Users/evan/RailsApps/showoff-wrangling-git
127.0.0.1 - - [05/Mar/2011 23:38:09] "GET / HTTP/1.1" 200 2652 0.0251
practivate.adobe.com - - [05/Mar/2011:23:38:09 EST] "GET / HTTP/1.1" 200 2652
- -> /
@emachnic
emachnic / ActiveMerchant Mongoid
Created March 25, 2011 15:37
Trying to create a Mongoid document from params received through ActiveMerchant
class Donation
include Mongoid::Document
field :success, :type => String
field :authorization, :type => String
field :message, :type => String
field :params, :type => Hash, :default => {}
def response=(response)
self.success = response.success?
self.authorization = response.authorization