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
import random | |
part1 = ["machine learning solution" , "recursive algorithm" , "e-portal" , "cross platform app" , "revolutionary supply chain management platform", "real-time code sharing tool" , "distributed solutions matrix", "backwards compatible hardware driver", "protocol suite"] | |
part2 = ["LGBT assylum seekers", "obese children", "the homeless" ,"the elderly", "rural communities" , "young people in disadvantaged areas", ] | |
part3 = ["bespoke twitter API","Big Data", "the Cloud", "open source software","obfuscated code" , "bitcoin mining", "a deep web neural network", "social media", "distributed networks", "node.js" ,] | |
rand1 = random.randrange(0,len(part1)) | |
rand2 = random.randrange(0,len(part2)) | |
rand3 = random.randrange(0,len(part3)) |
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
from intercom.client import Client | |
intercom = Client(personal_access_token='my_personal_access_token') | |
intercom.messages.create(**{ | |
"message_type": "inapp", | |
"body": "What's up :)", | |
"from": { | |
"type": "admin", | |
"id": "1234" | |
}, |
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
import io.intercom.api.Intercom; | |
import io.intercom.api.User; | |
public class Test { | |
public static void main(String[] args){ | |
Intercom.setToken("super_Secret_token"); | |
// Create a user | |
User user = new User() |
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
# get a user | |
user = intercom.users.find(email: "[email protected]") | |
# add a company to that user | |
user.companies = [{company_id: 6, name: "Intercom"},] | |
intercom.users.save(user) | |
puts user.companies[0].name # "Intercom" | |
#remove the same company | |
user.companies = [{company_id: 6, name: "Intercom", remove: true},] |
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
<script> | |
window.intercomSettings = { | |
app_id: "hy4aeebl", | |
name: "{{current_user.name}}", // Full name | |
email: "{{current_user.email}}", // Email address | |
created_at: {{current_user.created_at | date: "%s" }} | |
}; | |
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/hy4aeebl';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})() |
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
from slackclient import SlackClient | |
from flask import Flask, request | |
# Slack config | |
BOT_TOKEN = os.environ['BOTKEY'] | |
CHANNEL_NAME = "intercom-event-notifications" | |
app = Flask(__name__) | |
@app.route('/', methods=['POST']) |
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
URL = window.location.href; | |
if (URL.includes("terms")){ | |
termsPage = true; | |
} else { | |
termsPage = false; | |
} | |
var intercomSettings = { |
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 currentdate = new Date(); | |
var currentHour = currentDate.getHours(); | |
if (if currentHour > 9 && currentHour < 5)){ | |
window.intercomSettings = { | |
app_id: APP_ID, | |
}; | |
} | |
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
if (CurrentUser.loggedIn)){ | |
window.intercomSettings = { | |
app_id: APP_ID, | |
name: CurrentUser.Name, | |
email: CurrentUser.Email, | |
user_id: CurrentUser.userID, | |
}; | |
} else { | |
window.intercomSettings = { | |
app_id: APP_ID, |
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
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route('/', methods=['POST']) | |
def get_body(): | |
req = request.get_data() | |
print req | |
return req |