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
{ | |
"set_attributes": { | |
"attribute1": "some data goes here", | |
"attribute2": "more data in here" | |
}, | |
"messages": [{ | |
"text": "A text message can go here if you like" | |
}] | |
} |
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
server { | |
listen 80; | |
# Replace this with your domain | |
server_name www.mysite.com; | |
location / { | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_pass http://localhost:8080; |
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
const { readFileSync } = require('fs'); | |
const { join } = require('path'); | |
const html = readFileSync(join(__dirname, './index.html'), 'utf8'); | |
module.exports = (request, response) => { | |
response.send(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
function helpMe(question) { | |
return { | |
question, | |
response: 'Look here...', | |
url: 'https://marclittlemore.com/create-pretty-code-screenshots' | |
}; | |
} | |
// Help me! | |
const answer = helpMe("How do I make pretty code screenshots?"); |
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
// New way to import my library | |
const chatfuelBroadcast = require('chatfuel-broadcast'); | |
app.post('/broadcast-to-chatfuel', (request, response) => { | |
const { body } = request; | |
const { userId } = request.body; | |
const botId = '<your-bot-id>'; | |
const token = '<your-token>'; | |
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
[].forEach.call($$("*"), function(element) { | |
element.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16); | |
}); |
OlderNewer