Skip to content

Instantly share code, notes, and snippets.

View ylluminate's full-sized avatar

ylluminate ylluminate

View GitHub Profile
@ylluminate
ylluminate / gist:3890458
Created October 15, 2012 01:59 — forked from jugyo/gist:865475
TextMate command to convert slim to html
#!/usr/bin/env ruby
# Input: Selected Text or Nothing
# Output: Replace Selected Text
require 'tempfile'
def unindent(text)
lines = text.split(/\n/)
level = lines.map{|l| l[/^\s*/].size}.min
@ylluminate
ylluminate / ocp.php
Created April 14, 2013 00:57 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@ylluminate
ylluminate / Rails CMS Options
Last active December 20, 2015 12:09
Up-to-date list of Rails CMS options (Ruby on Rails CMS, both engine and stand alone)
Rails CMS Options
======================
Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then.
Active projects:
---------------
LocomotiveCMS
repo: https://github.com/locomotivecms/engine
site: http://www.locomotivecms.com
Last update: Jul 21, 2013
#!/usr/bin/env ruby
require 'net/smtp'
module MailMachine
class NetSmtp < Net::SMTP
class << self
EXCEPTIONS = [Net::SMTPAuthenticationError,
Net::SMTPServerBusy,
Net::SMTPSyntaxError,
Net::SMTPFatalError,
# Jubille started with:
# jubilee -p 8080 -e production
#
# Note that the Jubilee console outputs quite a few errors like below during
# the test:
#
# Jan 03, 2014 2:15:31 PM org.vertx.java.core.logging.impl.JULLogDelegate error
# SEVERE: Unhandled exception
# java.nio.channels.ClosedChannelException
Run `rackup` then visit http://localhost:9292/stuff.js.

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 wich helps you optimize your online forms. 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:

How to use swift in your terminal

setup

First, install Xcode 6 beta.

And run it.

sudo xcode-select -switch /Applications/Xcode6-Beta.app/Contents/Developer
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok, n1xim, pennedav, kabel)
Version: 0.2.0
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.2.0 0000-00-00 Updated page layout/styles and restructure code to be more MVC-like (kabel)
implemented HTTP Basic authentication (pennedav)
This is in reference to https://plus.google.com/105596541985629444566/posts/27y819XoT2V
to show simple steps I took to try and reproduce the described issue based upon the
information available. This is very simple benchmarking with an almost vanilla Rails 4
application using sqlite as the database so is not useful other than to demonstrate the
out of the box performance with TorqueBox and Trinidad under these situations is very
close.