# change mirror to ubuntu.osuosl.org first
sudo apt-get update
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
App.Comment = DS.Model.extend( | |
body: DS.attr("string") | |
post: DS.belongsTo('App.Post') | |
validate: -> | |
if @get("body") is `undefined` or @get("body") is "" | |
"Comments require a body." | |
) |
Put this code on the page where the form you want to track resides. Some other examples are currently passed around the web with varying quality. This is one that will work as long as your form tag has an id=
or name
attribute.
You don´t have to change this code to be able to track form abandonment in your shopping cart, order form or whatever form you want.
This sends events to Google Analytics when a user focuses somewhere not in a field after having focused on a input field. You won´t know for how long users focused on respective fields, or the actual conversion rate in the form using this, but it might be a start.
A tool that provides more insight both over time and per field, is Form Analytics. For instance, it measures dropout rate, average field input length, conversion rate and average time per field. All which provides great insights in the most overlooked, yet important part of you site.
Anyway, here´s the code:
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
require 'mogli' | |
module FacebookIntegrationHelpers | |
shared_context "with unconnected facebook user" do | |
let(:fb_user) { create_test_user(installed: false) } | |
after { fb_user.destroy } | |
end | |
def app_client | |
Mogli::AppClient.new(AppConfig.facebook.access_token, AppConfig.facebook.app_id) |
function precmd() { | |
if command git rev-parse --git-dir > /dev/null 2>&1; then | |
window_label=$(git rev-parse --show-toplevel) | |
tab_label=$(echo $window_label | awk -F\/ '{print "[git] " $NF}') | |
else | |
window_label=${PWD/${HOME}/\~} | |
tab_label=$window_label | |
fi | |
echo -ne "\e]2;${window_label}\a" | |
echo -ne "\e]1;${tab_label: -24}\a" |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rubygems' | |
gem 'minitest' | |
require 'minitest/autorun' | |
require 'action_controller/test_case' | |
require 'miniskirt' | |
require 'capybara/rails' |
<tr> | |
<td><%[email protected](".").drop(1) %></td> | |
<td><%= @value%></td> | |
</tr> |
<!-- /app/views/admin/users/new_invitiations.html.erb --> | |
<h2>Send invitation</h2> | |
<%= form_for @user, :url => send_invitation_admin_users_path do |f| %> | |
<table style='width: 50%'> | |
<tr> | |
<td><%= f.label :first_name %></td> | |
<td><%= f.text_field :first_name %></td> |
# GIT / GIT FLOW ALIASES | |
alias gft="git fetch --tags" | |
alias gpt="git push --tags" | |
alias gcm="git checkout master" | |
alias gmm="git merge master" | |
alias gcd="git checkout develop" | |
alias gmd="git merge develop" | |
gcf() { git checkout feature/$1; } |