Skip to content

Instantly share code, notes, and snippets.

View jngnyc's full-sized avatar

Jimmy Ng jngnyc

  • New York City, NY
  • 18:38 (UTC -04:00)
View GitHub Profile
=== Instabot ===
Contributors: instabot, abidzan
Tags: chatbot, chatbots, instabot, live-chat, livechat
Requires at least: 4.0
Tested up to: 4.0
Stable tag: 0.1.0
Requires PHP: 5.4.0 or later
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
var props = context.getCustomProperties();
console.log("establishment: " + props["establishment"].value);
console.log("city: " + props["city"].value);
console.log("state: " + props["state"].value);
var user = context.getUser();
console.log(user.ipAddress);
$.ajax({
type: 'POST',
<html>
<body>
<script type="text/javascript" src ="https://widget.instabot.io/jsapi/rokoInstabot.js">
apiKey: "x4UqwORVpBXbysB6NpeFbeKdLYRRGVkIhKg1wYU2k1c=",
userName: function() {
//***
// YOUR DEVELOPER MUST COMPLETE THIS PART
//***
var username = <EMAIL-ADDRESS-OF-THE-USER-THAT-JUST-LOGGED-IN>;
<script type="text/javascript" src ="//widget.instabot.io/jsapi/rokoInstabot.js">
apiKey: "x4UqwORVpBXbysB6NpeFbeKdLYRRGVkIhKg1wYU2k1c="
</script>
data = {
:"email" => self.email,
:"userName" => self.email,
:"userPassword" => "password",
:"FirstName" => self.name,
#!/bin/sh
start_time=0
duration=0
fps=10
scale=640
palette="/tmp/palette.png"
filters="fps=$fps,scale=$scale:-1:flags=lanczos"
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Layout</title>
<style type="text/css">
body, html
{
margin: 0; padding: 0; height: 100%; overflow: hidden;
}
#content
<script type="text/javascript">(function (i, s, o, u, a, m) { a = s.createElement(o); a.innerHTML = 'apiKey: "O/R97Wgd+mGzIXfpGOppwHBVhugnMnzbACwSJDOcmKc="'; tags = s.getElementsByTagName(o); m = tags[tags.length - 1]; a.async = 1; a.src = u; m ? m.parentNode.insertBefore(a, m) : s.body.appendChild(a); })(window, document, "script", "//app.instabot.io/jsapi/v2/rokoInstabot.js");</script>
window.WebhookUtils = {
parseOrderStatus: function(ordersObj) {
var returnString = "";
var orderNumber = ordersObj.orderNumber;
var orderStatus = ordersObj.orderStatus;
if ( (orderStatus) == "in_progress") {
returnString = "Your shipment " + orderNumber + " containing `shipment products` is being shipped by `carrier`. It is currently `status` and is estimated to arrive at `estimated_delivery_date";
window.WebhookUtils = {
upperCase: function (val) {
if (val) {
val = val.toUpperCase();
}
return val;
},
// Lowercase transformation:
lowerCase: function (val) {
if (val) {