This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var items = input.your_string_array.split("\n\n").map(function(i){ | |
var _i = {}; | |
i.split("\n").forEach(function(kv){ | |
kv = kv.split(':'); | |
_i[kv[0].trim()] = kv[1].trim(); | |
}); | |
return _i; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Three Things Today!</title> | |
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> | |
<style> | |
body{ | |
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is an appendix to [conveyour-analytics-with-javascript](http://conveyour.com/help/conveyour-analytics-with-javascript). | |
See step 3. How do you get the user data into that Conveyour.identify call? | |
The steps | |
- In your PHP file gather the desired user meta data | |
- Echo the gathered data out as a JSON variable in your PHP file | |
- Use that new javascript object as a reference in the identify call. | |
Example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a[data-affiliate]').click(function(e){ | |
var _this = $(this); | |
e.preventDefault(); | |
var aff = _this.data('affiliate'); | |
Conveyour.track('chose_affiliate', { | |
affiliate : aff | |
}); | |
window.open(_this.attr('href'), "_blank"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AF,AX,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BT,BO,BQ,BA,BW,BV,BR,IO,BN,BG,BF,BI,KH,CM,CA,CV,KY,CF,TD,CL,CN,CX,CC,CO,KM,CG,CD,CK,CR,CI,HR,CU,CW,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GH,GI,GR,GL,GD,GP,GU,GT,GG,GN,GW,GY,HT,HM,VA,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IM,IL,IT,JM,JP,JE,JO,KZ,KE,KI,KP,KR,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,MX,FM,MD,MC,MN,ME,MS,MA,MZ,MM,NA,NR,NP,NL,NC,NZ,NI,NE,NG,NU,NF,MP,NO,OM,PK,PW,PS,PA,PG,PY,PE,PH,PN,PL,PT,PR,QA,RE,RO,RU,RW,BL,SH,KN,LC,MF,PM,VC,WS,SM,ST,SA,SN,RS,SC,SL,SG,SX,SK,SI,SB,SO,ZA,GS,SS,ES,LK,SD,SR,SJ,SZ,SE,CH,SY,TW,TJ,TZ,TH,TL,TG,TK,TO,TT,TN,TR,TM,TC,TV,UG,UA,AE,GB,US,UM,UY,UZ,VU,VE,VN,VG,VI,WF,EH,YE,ZM,ZW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
//this is our function we pass to the onSubmit | |
function validateForm (e) { | |
var _this, data; | |
e.preventDefault(); | |
_this = $(this); | |
data = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'beanstalkapp' | |
Beanstalk::API::Base.setup( | |
:domain => "your_beanstalk_account_subdomain", | |
:login => "login", | |
:password => ENV['BEANSTALK_PW'] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// - jquery.event.fastfix.js | |
(function () { | |
// http://bitovi.com/blog/2012/04/faster-jquery-event-fix.html | |
// https://gist.github.com/2377196 | |
// IE 8 has Object.defineProperty but it only defines DOM Nodes. According to | |
// http://kangax.github.com/es5-compat-table/#define-property-ie-note | |
// All browser that have Object.defineProperties also support Object.defineProperty properly | |
if(Object.defineProperties) { | |
var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.tmpl = function(obj){ | |
var str, keys, _do; | |
//store string | |
str = this.toString(); | |
//if no object just return string | |
if(!obj || typeof obj !== "object"){ | |
return str; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// APPCELERATOR - STACKMOB IOS MODULE | |
// | |
// aaron@clearlyinnovative.com | |
// blog.clearlyinnovative.com | |
// | |
// http://stackmob.com | |
// | |
var window = Ti.UI.createWindow({ | |
backgroundColor: 'white' |