Skip to content

Instantly share code, notes, and snippets.

@TOAST3R
TOAST3R / gist:65e41c72d00eb7d18d6c
Last active March 31, 2017 04:00
techno track with EarSketch
from earsketch import *
from random import *
init()
setTempo(125)
# declare variables
kick = OS_KICK01
snare = OS_SNARE01
hit_hat = OS_OPENHAT03
@TOAST3R
TOAST3R / get_mixpanel.rb
Last active August 29, 2015 13:57
Get data from mixpanel
#Install ruby
require 'rubygems'
require 'mixpanel_client'
#How to get totals visitors:
config = {api_key: 'changeme', api_secret: 'changeme'}
client = Mixpanel::Client.new(config)
@TOAST3R
TOAST3R / gist:8692283
Last active August 29, 2015 13:55
Mixpanel integration Click Seguros
//When the landing page loads you should add the code attached in mixpanel_production.js to the head of the page
//More info here: https://mixpanel.com/docs/integration-libraries/javascript
//When the first page of the contracting process loads it should exectute the following:
mixpanel.track('External CI Interaction', {provider: "Click Seguros", page: "Page 1"});
//When the last page of the contracting process loads it should exectute the following:
mixpanel.track('External CI Interaction', {provider: "Click Seguros", page: "Page Results"});
@TOAST3R
TOAST3R / gist:8672164
Last active January 4, 2016 20:09
Mixpanel example tracking
//Setup
//To start tracking with Javascript, paste the following code into the page you want to track
//inside the <head> and </head> tags. Make sure to change 'YOUR_TOKEN' to the project token from your Mixpanel dashboard.
//We load the library onto the page asynchronously, which keeps your website loading quickly even if placed in the <head> of the page.
(function(c,a){window.mixpanel=a;var b,d,h,e;b=c.createElement("script");
b.type="text/javascript";b.async=!0;b.src=("https:"===c.location.protocol?"https:":"http:")+
'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';d=c.getElementsByTagName("script")[0];
d.parentNode.insertBefore(b,d);a._i=[];a.init=function(b,c,f){function d(a,b){
var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(