Skip to content

Instantly share code, notes, and snippets.

@kpnemo
kpnemo / gist:57a80fe3df1ecfbc9286
Created November 23, 2014 10:15
User managment
GROUPS
GET /groups - get group index (?per_page=10&offset=20)
POST /groups - create new group
PUT /groups/:id - update group
DELETE /groups/:id - delete group
{
"id": id,
"name": "Group Name",
"descriptions": "Group descriptions",
<script type="text/javascript" src="http://trackingdesk.com/event.js"></script>
var mongo = require('mongodb'),
MongoClient = mongo.MongoClient,
MongoServer = mongo.Server,
MongoDb = mongo.Db,
MongoBSON = mongo.pure().BSON,
MongoGridStore = mongo.GridStore,
MongoBinary = mongo.Binary,
MongoCode = mongo.Code,
MongoObjectId = mongo.ObjectID,
crypto = require('crypto'),
var appEvetns = require('../inc/app_events'),
dbUtils = require('../inc/db_util'),
MongoDb = dbUtils.mongo.Db,
MongoBSON = dbUtils.mongo.pure().BSON,
MongoGridStore = dbUtils.mongo.GridStore,
MongoBinary = dbUtils.mongo.Binary,
MongoCode = dbUtils.mongo.Code,
MongoObjectID = dbUtils.mongo.ObjectID,
moment = require('moment'),
_ = require('lodash'),
@kpnemo
kpnemo / gist:78881d251d83b6cec680
Created February 17, 2015 15:45
tooltips product showbox
{
"tooltip_id": "Tooltip text here",
"menu_top_profile": "Click to change your profile"
}
<html>
<head>
<link rel="icon" href="http://assets.servedbytrackingdesk.com/favicon.ico">
<title>This domain is being used by one of TrackingDesk</title>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
{
"id": "77f9aca00f3d449cbb182d5a5022b99c",
"block_id": "54fec387175101d5570e2951",
"episode_id": null,
"user_id": "530e069a137b1f5055767cd2",
"state": "ready",
"pub_sub_channel": "wf:77f9aca00f3d449cbb182d5a5022b99c",
"created_at": "2015-03-16 10:40:31 UTC",
"processing_started_at": "2015-03-16 10:40:31 UTC",
"ended_at": "2015-03-16 10:44:52 UTC",
{
"SECTION": "============HEADER============",
"Logo": {
"title": "Showbox - Show the world",
"position": "right"
},
"Header_Cloud_Icon": {
"title": "Media Gallery",
"position": "left"
},
{
"SECTION": "============HEADER============",
"Logo": {
"title": "Showbox - Show the world",
"position": "right"
},
"Header_Cloud_Icon": {
"title": "Media Gallery",
"position": "left"
},
{
"SECTION": "============HEADER============",
"Logo": {
"title": "Showbox - Show the world",
"position": "right"
},
"Header_Cloud_Icon": {
"title": "Media Gallery",
"position": "left"
},