Skip to content

Instantly share code, notes, and snippets.

View mark-ellul's full-sized avatar

Mark Ellul mark-ellul

View GitHub Profile
require 'iron_worker_ng'
class MedalAwardWorker < IronWorkerNG::Base
attr_accessor :json_action
def run
end
end
@mark-ellul
mark-ellul / gist:2227740
Created March 28, 2012 16:02
Load all models
Dir[File.join("app", "models", "**/*.rb")].each do |f|
require f
end
@mark-ellul
mark-ellul / rbenv-install-system-wide.sh
Created August 15, 2012 10:19 — forked from v1nc3ntlaw/rbenv-install-system-wide.sh
rbenv install ruby 1.9.3-p194 on Debian 6 Squeeze
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@mark-ellul
mark-ellul / gist:3530416
Created August 30, 2012 15:09
Email Boilerplate as of 2012-08-30
!!! Strict
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
%title Your Message Subject or Title
:css
/* Based on The MailChimp Reset INLINE: Yes. */
/* Client-specific Styles */
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
@mark-ellul
mark-ellul / gist:3530420
Created August 30, 2012 15:09
Email Boilerplate as of 2012-08-30
!!! Strict
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
%title Your Message Subject or Title
:css
/* Based on The MailChimp Reset INLINE: Yes. */
/* Client-specific Styles */
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
@mark-ellul
mark-ellul / gist:3531320
Created August 30, 2012 15:45
Email Boilerplate as HAML with yield to use as layout in Rails actionmailer
!!! Strict
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
%title Your Message Subject or Title
:css
/* Based on The MailChimp Reset INLINE: Yes. */
/* Client-specific Styles */
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
@mark-ellul
mark-ellul / subdomain_application_router.rb
Created June 4, 2015 06:12
A new router to get around having a subdomain constraint in your apps routes
module AePageObjects
class SubdomainApplicationRouter < AePageObjects::BasicRouter
# This whole file is a kludge and probably belongs in an ae_page_objects-rails extension
module Recognizer
class Base
def generate_path(named_route, *args)
if routes.respond_to?("#{named_route}_path")