Skip to content

Instantly share code, notes, and snippets.

View kohiomobz's full-sized avatar

Kavodel kohiomobz

View GitHub Profile
@kohiomobz
kohiomobz / tse_example.html
Last active December 18, 2015 15:04
Example TSE
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/css/reset.css">
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.css">
<script src="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<style>
.node circle {
@kohiomobz
kohiomobz / brew_errors.txt
Created October 9, 2015 22:45
Homebrew Errors
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libopencv_adas.3.0.0.dylib
/usr/local/lib/libopencv_bgsegm.3.0.0.dylib
/usr/local/lib/libopencv_bioinspired.3.0.0.dylib
/usr/local/lib/libopencv_calib3d.3.0.0.dylib
/usr/local/lib/libopencv_ccalib.3.0.0.dylib
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/css/reset.css">
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.css">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<style>
/* After Loading the Snippet */
/* You can namespace each instance of the Mixpanel JavaScript Library */
/* First Instance */
mixpanel.init("Token1", {}, 'developmentProject');
/* Second Instance */
mixpanel.init("Token2", {}, 'productionProject');
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/css/reset.css">
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.css">
<script src="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.js"></script>
</head>
<body class="mixpanel-platform-body">
<div id="table"></div>
@kohiomobz
kohiomobz / first-time.objc
Created July 30, 2015 19:43
First App Launch
// Let’s check if we have a firstLaunch property inside NS Standard Defaults - if not, let’s set first app launch to YES
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"firstLaunch"]){
NSDictionary *appLaunchProperties = @{@"first app launch" : @YES};
[[Mixpanel sharedInstance] track:@"App Launched" properties:appLaunchProperties];
[[Mixpanel sharedInstance] registerSuperProperties:appLaunchProperties];
[[Mixpanel sharedInstance].people set:@{@"First App Launch": [NSDate date]}];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"firstLaunch"];
[[NSUserDefaults standardUserDefaults] synchronize];
} else {
@kohiomobz
kohiomobz / gist:b920ff837c889fee9bff
Created May 27, 2015 00:12
Getting URL Parameters
function campaignParams() {
var campaign_keywords = 'utm_source utm_medium utm_campaign utm_content utm_term'.split(' ')
, kw = ''
, params = {}
, first_params = {} ;
var index;
for (index = 0; index < campaign_keywords.length; ++index) {
kw = getQueryParam(document.URL, campaign_keywords[index]);
if (kw.length) {
1. Signup for Github Account
2. Create a Gist
3. Specify Language as JavaScript
4. Paste Code in.
5. Create public Gist
6. Send over link
@kohiomobz
kohiomobz / Dashboard
Created April 10, 2015 23:53
Dashboard
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/css/reset.css">
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.css">
<script src="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.js"></script>
</head>
<body class="mixpanel-platform-body">
<div class="mixpanel-platform-section">
<div id="eventSelect" style="float: left;"></div>
@kohiomobz
kohiomobz / flows.js
Created April 10, 2015 23:50
Example Flows Chart
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/css/reset.css">
<link rel="stylesheet" type="text/css" href="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.css">
<script src="https://cdn.mxpnl.com/libs/mixpanel-platform/build/mixpanel-platform.v0.latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<style>