Skip to content

Instantly share code, notes, and snippets.

@TOAST3R
TOAST3R / gist:65e41c72d00eb7d18d6c
Last active Mar 31, 2017
techno track with EarSketch
View gist:65e41c72d00eb7d18d6c
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 Aug 29, 2015
Get data from mixpanel
View get_mixpanel.rb
#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 Aug 29, 2015
Mixpanel integration Click Seguros
View gist:8692283
//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 Jan 4, 2016
Mixpanel example tracking
View gist:8672164
//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(