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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Headless CMS Platform — Deckchair Asia</title> | |
| <style> | |
| body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 860px; margin: 0 auto; padding: 2rem; color: #1a1a1a; line-height: 1.7; } | |
| h1 { font-size: 2rem; border-bottom: 3px solid #0070f3; padding-bottom: 0.5rem; margin-bottom: 0.25rem; } | |
| h2 { font-size: 1.4rem; margin-top: 2.5rem; color: #0070f3; border-bottom: 1px solid #e0e0e0; padding-bottom: 0.25rem; } |
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); | |
| }); |
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
| 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
| 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
| 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
| { | |
| "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
| { | |
| "messages": [{ | |
| "attachment": { | |
| "type": "template", | |
| "payload": { | |
| "template_type": "generic", | |
| "elements": [{ | |
| "title": "Welcome!", | |
| "subtitle": "We have the right hat for everyone.", | |
| "image_url": "https://petersfancybrownhats.com/company_image.png", |
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
| { | |
| "message": { | |
| "text": "Hi there. Would you like to talk to my bot?", | |
| "quick_replies": [{ | |
| "content_type": "text", | |
| "title": "Yes please", | |
| "payload": "Yes" | |
| }, | |
| { | |
| "content_type": "text", |
NewerOlder