Skip to content

Instantly share code, notes, and snippets.

View andreisavu's full-sized avatar
👨‍💻

Andrei Savu andreisavu

👨‍💻
View GitHub Profile
session.addCustomEvent(
"page_view",
"/65242628309/orders/0741e175be4d5ddb25291b4a189aa1e9",
{
"referer" : "",
"fragment": "..."
... other page metadata as needed
}
)
import { Moonsense } from '@moonsense/moonsense-web-sdk';
const moonsenseSdk = new Moonsense({
publicToken: 'ADD PUBLIC TOKEN HERE ..'
});
const session = moonsenseSdk.startSesssion(15000);
session.stopSession();
import MoonsenseSDK
Moonsense.initialize(
publicToken: "ADD PUBLIC TOKEN HERE .."
)
var session: Session? = try? Moonsense.startSession(
duration: 15,
labels: ["label1", "label2"]
)
import io.moonsense.sdk.Moonsense
import io.moonsense.sdk.model.Session
Moonsense.initialize(
context,
"ADD PUBLIC TOKEN HERE .."
)
var session: Session? = Moonsense.startSession(
15,

Keybase proof

I hereby claim:

  • I am andreisavu on github.
  • I am andreisavu (https://keybase.io/andreisavu) on keybase.
  • I have a public key ASDp1eRGPivSk_s7zaaLxykntqlmIZ8VEybGQmZGpg5_pwo

To claim this, I am signing this object:

#! /usr/bin/env python
# Copyright (c) 2015 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java
@andreisavu
andreisavu / counter.py
Created October 26, 2012 23:08 — forked from ericmoritz/counter.py
A counter stored in Riak that handles conflict resolutions on read
import logging
import riak
log = logging.getLogger(__name__)
class RiakCounter(object):
def __init__(self, bucket, key):
self.bucket = bucket
self.bucket.set_allow_multiples(True)
self.key = key
@andreisavu
andreisavu / gist:2891273
Created June 7, 2012 20:10
jclouds with cloudstack 3.0 failing tests
testAScriptExecutionAfterBootWithBasicTemplate
testAndExperiment
testAssociateDisassociatePublicIPAddress
testCanSshInThroughNewLoadBalancerRule
testConcurrentUseOfComputeServiceToCreateNodes
testCreateAndRunAService
testListResourceLimits
Bugs in CS3:
@andreisavu
andreisavu / brooklyn-dependent-entity-config.json
Created May 15, 2012 20:45
Suggestions from Alex for Brooklyn dependent entitiy configuration
{
"name":"web-and-db",
"entities":[{
"type":"brooklyn.entity.webapp.ElasticJavaWebAppService",
"config":{
"java.options":{
"type":"Map",
"operation":"put",
"values":{
"brooklyn.example.db.url":{