Skip to content

Instantly share code, notes, and snippets.

var AWS = require("aws-sdk");
AWS.config.update({
region: "us-east-1",
endpoint: "dynamodb.us-east-1.amazonaws.com"
});
var docClient = new AWS.DynamoDB.DocumentClient();
// The table I created
var cart = new SPCart("DEFAULT", userID);
if(!input.isLoggedIn)
cart.setRequestedFor(userID);
else{
cart.setRequestedFor(gs.getUserID());
}
var item = cart.addItem(data.sys_id);
cart.setVariable(item,'email',input.fields.email);
@dmfranko
dmfranko / servicenow_datatables.js
Created October 26, 2015 19:16
ServiceNow and datatables
<?xml version="1.0" encoding="UTF-8"?>
<j:jelly xmlns:j="jelly:core" xmlns:g="glide" xmlns:g2="null" xmlns:j2="null" trim="false">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js" />
<!-- Don't include bootstrap or jquery-->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/bs/pdfmake-0.1.18,dt-1.10.9,b-1.0.3,b-html5-1.0.3,b-print-1.0.3,r-1.0.7,sc-1.3.0/datatables.min.css" />
<script type="text/javascript" src="https://cdn.datatables.net/r/bs/pdfmake-0.1.18,dt-1.10.9,b-1.0.3,b-html5-1.0.3,b-print-1.0.3,r-1.0.7,sc-1.3.0/datatables.min.js" />
<div class="container" id="container" ng-app="myApp">
<h4>My Incidents</h4>
<table class="table display nowrap" id="incidents" ng-controller="IncidentController" cellspacing="0" width="100%">