- Twitter: @jagthedrummer
- Website or Blog: http://www.octolabs.com/
- Company: OctoLabs http://www.octolabs.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var get = Ember.get; | |
/** | |
@extends Ember.Mixin | |
Implements common pagination management properties for controllers. | |
*/ | |
Ember.PaginationSupport = Ember.Mixin.create({ | |
/** | |
*/ |
- Twitter: @example
- Website or Blog: http://example.net
- Company: Example Ltd. http://example.com
[Feel free to add more details if you wish…]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Blog settings | |
### | |
# Time.zone = "UTC" | |
activate :blog do |blog| | |
# This will add a prefix to all links, template references and source paths | |
blog.prefix = "blogs/octoblog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helpers do | |
def default_title | |
title = current_page.data.title || @page_title | |
title | |
end | |
def page_title | |
title = default_title | |
if title.present? | |
title += " @ " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick and dirty code to drop into a Rails controller to trace execution through code paths and graph it. | |
# Changing the conditional on line 10 allows you to tweak which classes/directories you see int he graph. | |
# The trace_calls method could also be used outside a controller like: trace_calls{ do_some_method } | |
around_action :trace_calls | |
def trace_calls | |
g = GraphViz.new( :G, :type => :digraph ) | |
nodes = [] | |
trace = TracePoint.new(:call,:return) do |tp| | |
if tp.path =~ /clickfunnels\/userpages/ #|| tp.path =~ /clickfunnels\/app/ #|| tp.path =~ /clickfunnels\/lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This task should be run inside an environment that is already configured to connect to the redis | |
# instance that we're transfering AWAY FROM. | |
# | |
# The task should be handed the URL of the redis instance that we're MOVING TO. | |
# | |
# To run it and pass in the destination Redis you'd do something like this: | |
# rake sidekiq:transfer[redis://...] | |
# | |
# As jobs are added to the destination Redis, they're deleted from the source Redis. This | |
# allows the task to be restarted cleanly if it fails in the middle due to a network error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Point at our Gemfile | |
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | |
# load rubygems & bundler | |
require "rubygems" | |
require 'bundler/setup' # Sometimes this line triggers modifications to Gemfile.lock | |
# Set up gems listed in the Gemfile. | |
Bundler.require(:default, :production) |