Skip to content

Instantly share code, notes, and snippets.

View koenpunt's full-sized avatar
:octocat:
...

Koen Punt koenpunt

:octocat:
...
View GitHub Profile
@koenpunt
koenpunt / alias.sh
Created April 8, 2014 14:43 — forked from fcoury/alias.sh
#
# zsh function to start Foreman based on whether or not
# you have multiple Procfiles
#
# we are adopting this schema of having environment
# specific Procfiles:
#
# config/development.proc
# config/stage.proc
# config/production.proc

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:

#!/bin/bash
# $Id: ldap_ssh_key.sh 138 2013-09-14 08:24:39Z jmorano $
#
# Check if the user is in the right group
# and afterwards retrieve the SSH public key from LDAP
# Logs directly in Syslog
#
#
# sshd_config for OpenSSH 6.2 or higher:
#
@koenpunt
koenpunt / UIImageView+imageDimensions.swift
Created September 3, 2015 14:44
UIImageView extension for calculated UIImageSize
//
// UIImageView+imageFrame.swift
// Tindex
//
// Created by Koen Punt on 24-08-15.
// Copyright (c) 2015 Koen Punt. All rights reserved.
//
import UIKit
@koenpunt
koenpunt / setup-mailcatcher-upstart.md
Last active November 3, 2015 13:41
Setup MailCatcher with rbenv and upstart

Setup MailCatcher with upstart

Clone the mailcatcher repo to a directory, here I use ~/.mailcatcher.

git clone https://github.com/sj26/mailcatcher.git ~/.mailcatcher

Navigate to the directory and setup the dependencies:

@koenpunt
koenpunt / sass-mixins-to-css.md
Last active December 2, 2015 22:54
Sass mixins to plain CSS

Some regular expressions to replace mixins for plain CSS

# search
@include (transition|transform|opacity|backface-visibility|box-sizing|box-shadow|user-select|background(?:-image)?)\((.*)\)
# replace
$1: $2

# search
@include (translate3d|rotate|translateX|translateY)\((.*)\)

replace

@koenpunt
koenpunt / tinder-api-documentation.md
Created February 2, 2016 00:37 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

Note: this was written in April/May 2014 and the API may have changed since

API Details

@koenpunt
koenpunt / README.md
Last active May 2, 2016 16:47
UIRefreshControl override so that app correctly idles while UI testing

UIRefreshControl+testing.swift

You'll need to a -DTESTING compile flag to the configuration you use for testing to enable this extension only for test builds.

Imgur

@koenpunt
koenpunt / tinder-api-documentation.md
Last active February 10, 2016 23:31 — forked from boycarper/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

Note: this was written in April/May 2014 and the API may have changed since. I have nothing to do with Tinder, nor their API, and I do not offer any support for anything you may build on top of this

API Details