Mountain Lion (10.8) has three main difference compared to Lion (10.7):
- XCode 4.4 does not install Command Line Tools by default
- X11 isn't available anymore
- The installed version of OpenSSL has some bugs
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
# encoding: utf-8 | |
# | |
class Account::CreditCardController < Account::BaseController | |
# GET /account/credit_card | |
def edit | |
@account = current_account | |
@credit_card = ActiveMerchant::Billing::CreditCard.new | |
end | |
# PUT /account/credit_card |
I have a project where I need translated content. Therefore I use globalize3, wich stores its translated attributes in a seperate table that belongs to the original model. And I use RailsAdmin for painless record management.
It took me some time to figure out how to get those working together, but eventually I found a solution that is non invasive and still ok to work with.
In my case there is a Snippet
class. It holds content for static pages or text passages on the website. There is a good README for globalize3 for installation instructions and documentation.
Serving Rails static assets is hard, especially on Heroku Cedar where Heroku forces Rails to serve static assets itself (which isn't particularly performant nor worth your dyno-dollar)---this is different than Heroku Bamboo which used Varnish and is no more. To make the best of the situation, I highly recomend:
Using the Heroku-Deflater gem which will selectively gzips assets (it gzips text-based files; and excludes images or binary files, which can actually be bigger when gzipped)
Configure your production environment to set cache-control headers and get out of denial about how static assets are being served on Heroku Cedar
Use AWS Cloudfront (or a CDN of your choosing) to serve the assets. Cloudfront is great because you can use the same Distribution
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
diff --git a/wp-content/plugins/participants-database/classes/FormElement.class.php b/wp-content/plugins/participants-database/classes/FormElement.class.php | |
index 1d0ff6a..d83bf29 100644 | |
--- a/wp-content/plugins/participants-database/classes/FormElement.class.php | |
+++ b/wp-content/plugins/participants-database/classes/FormElement.class.php | |
@@ -614,7 +614,7 @@ class FormElement { | |
*/ | |
private function _submit_button() { | |
- $this->_addline( $this->_input_tag( 'submit' ) ); | |
+ $this->_addline( '<button type="submit" class="btn btn-primary" id="'.$this->name.'">'.$this->value.'</button>' ); |
perl -0ne 'print "$1\n" while (/a href=\"(.*?)\">.*?<\/a>/igs)' file.html | perl -ne '$H{$_}++ or print' |