This file contains hidden or 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
#socialmessage, #socialnetworks{float:none;} | |
#gplus{float:left;} | |
#socialnetworks #Twitter, #socialnetworks #Facebook {float:left; !important} |
This file contains hidden or 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
<script> | |
$(document).ready(function(){ | |
$("#signup_form").bind("kol:success", function(e, data, status, xhr) { | |
$div = $('<div style="display:inline;">'); | |
$div.append('<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/992175653/?value=20&label=J_1oCKunogMQpcyN2QM&guid=ON&script=0"/>'); | |
$div.appendTo('body'); | |
}); | |
}); | |
</script> |
This file contains hidden or 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
module Postmarker | |
def postmark_mail(*args) | |
mail_message = mail(*args) | |
if can_use_postmark?(mail_message.From.to_s) | |
mail_message.delivery_method.settings.merge!( | |
:address => 'smtp.postmarkapp.com', |
This file contains hidden or 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
class Domain | |
def self.matches?(request) | |
# ROOT_DOMAIN is a configurable value so we don't catch skip www.kickofflabs.com | |
request.host.downcase != KickoffLabs::ROOT_DOMAIN | |
end | |
end |
This file contains hidden or 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
HOMEBREW_VERSION: 0.8 | |
HEAD: 6d15547fa6d422fd55e3c7c7dcf617176afe55da | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
HOMEBREW_REPOSITORY: /usr/local | |
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew | |
Hardware: 8-core 64-bit sandybridge | |
OS X: 10.7 | |
Kernel Architecture: x86_64 | |
Ruby: 1.8.7-249 |
This file contains hidden or 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
# Pass in the name of the site you wich to create a cert for | |
domain_name = ARGV[0] | |
if domain_name == nil | |
puts "Y U No give me a domain name?" | |
else | |
system "openssl genrsa -out #{domain_name}.key 1024" | |
system "openssl req -new -key #{domain_name}.key -out #{domain_name}.csr -subj '/C=US/ST=NJ/L=Monroe/O=MyCompany/OU=IT/CN=#{domain_name}'" | |
system "cp #{domain_name}.key #{domain_name}.key.bak" |
This file contains hidden or 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
# Restart a rack app running under pow | |
# http://pow.cx/ | |
# | |
# Adds a kapow command that will restart an app | |
# | |
# $ kapow myapp | |
# $ kapow # defaults to current directory | |
# | |
# Supports command completion. | |
# |
This file contains hidden or 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
module MailQueue | |
extend self | |
def queue | |
:default | |
end | |
def perform(options = {}) | |
options = options.with_indifferent_access |
This file contains hidden or 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
Site.joins(:user).select('sites.user_id, count(*) as count').group('sites.user_id') | |
<Site user_id: 1> #should have a count of 2 | |
# returns only the user_id. If I cheat and name the 'count' column the same name as another column on my model it returned. | |
Site.joins(:user).select('sites.user_id, count(*) as id').group('sites.user_id') #BAD! | |
<Site id: 2, user_id: 1> #id == count in this result |
This file contains hidden or 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
require 'resque/server' | |
class SecureResqueServer < Resque::Server | |
before do | |
redirect '/' unless some_condition_is_met! | |
end | |
end |