This file contains hidden or 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
// Sign hash with secret | |
var hash = CryptoJS.HmacSHA256(context, shared); | |
// encrypt signed hash to base64 | |
var b64Hash = CryptoJS.enc.Base64.stringify(hash); |
This file contains hidden or 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
// split request at '.' | |
var hashedContext = signed_req.split('.')[0]; | |
var context = signed_req.split('.')[1]; |
This file contains hidden or 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
app.post('/', function (req, res) { | |
}) |
This file contains hidden or 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
{ | |
"name": "my_canvas_app", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"body-parser": "^1.15.0", | |
"crypto-js": "^3.1.6", | |
"express": "^4.13.4" | |
}, |
This file contains hidden or 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 express = require('express'), | |
bodyParser = require('body-parser'), | |
app = express(), | |
path = require('path'), | |
CryptoJS = require("crypto-js"); | |
app.use(express.static(path.join(__dirname, 'public'))); | |
app.use(express.static(path.join(__dirname, 'bower_components'))); | |
app.use(bodyParser.json()); // create application/json parser |
This file contains hidden or 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 run(){ | |
var items = $(".ticket_filter_item_non_selectable"); | |
if (items.length == 0){ | |
console.log("ALL DONE!"); | |
return; | |
} | |
var item = items[0]; | |
item.click(); | |
setTimeout(function(){ | |
var link = $("a:contains('Undelete Case')"); |
This file contains hidden or 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
├── index.js | |
└── public | |
└── views | |
└── index.html |
This file contains hidden or 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
<html> | |
<head> | |
<title>My Canvas App</title> | |
<!-- stylesheet --> | |
<link rel="stylesheet" type="text/css" href="https://necolas.github.io/normalize.css/3.0.2/normalize.css"> | |
</head> | |
<body> | |
<h3>Please select the product related to this case</h3> | |
<form> | |
<div> |
This file contains hidden or 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
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tr> | |
<td align="center" valign="top"> | |
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tr> | |
<td valign="top" style="color:#333; font-family:Arial; font-size:14px; line-height:150%; text-align:left;"> | |
<table border="0" cellpadding="10" cellspacing="0" width="100%"> | |
<tr> |