Skip to content

Instantly share code, notes, and snippets.

View slvnperron's full-sized avatar

Sylvain Perron slvnperron

View GitHub Profile
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap');
.bpw-layout {
font-family: 'Roboto', sans-serif !important;
}
.bpw-from-bot .bpw-chat-bubble .bpw-chat-bubble-content {
background-color: #ececec !important;
}
@slvnperron
slvnperron / webchat.css
Created October 24, 2019 18:27
CSS Webchat
.bpw-button, .bpw-button-alt {
height: unset;
min-height: 40px;
}
@slvnperron
slvnperron / UBUNTU-DOCKER-ENTERPRISE-README.sh
Last active April 14, 2021 17:11
Installing Botpress on vanilla Ubuntu
# Ubuntu 18.04
# Step 1. Installing Docker
# -------------------------
# Reference: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
sudo apt update && \
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \
@slvnperron
slvnperron / suggestion_chips.js
Created April 25, 2019 15:44
Outgoing Middleware
const _ = require('lodash')
/**
* This outgoing middleware will find the $"..." pattern in the ougoing text
* And transform those into suggestion chips in channel-web
* @example e.g.
* `What type of restaurant are you looking for? $“Asian” $”Mexican” $”American”`
*/
const regex = /\$(“|'|"|”)([\w\s]+)(“|'|"|”)/g
@slvnperron
slvnperron / actions.js
Created January 16, 2019 20:47
Haytham jumpTo (bp 10)
/**
* Description of the action goes here
* @param {String} params.name=value Description of the parameter goes here
* @param {Number} [params.age] Optional parameter
*/
async function yourCustomAction(state, event, params) {
return state;
}
/**
@slvnperron
slvnperron / keybase.md
Last active December 7, 2017 16:44
keybase.md

Keybase proof

I hereby claim:

  • I am slvnperron on github.
  • I am slvn (https://keybase.io/slvn) on keybase.
  • I have a public key whose fingerprint is 8DD9 9A84 62BE 0FA9 06E6 CB74 7824 BCA4 9603 A72F

To claim this, I am signing this object:

@slvnperron
slvnperron / content.yml
Created May 24, 2017 23:33
This is an example of how to build a form in Botpress using three different ways
misunderstand:
- I don't understand this.
done:
- 🎈
- We're all done then :)
ask_gender:
- text: What is your gender?
quick_replies:
@slvnperron
slvnperron / THEMING.md
Created March 10, 2017 22:01
Theming your Botpress bot

Applying a custom theme to your Botpress bot

New in version 0.1 but still undocumented is the ability to override the global botpress theme.

For bots prior 0.1

You'll need to migrate your bot to 0.1 (see the README for the migration guide) then create a new file at your bot's root directory called theme.scss with this content inside.

For bots >= 0.1

@slvnperron
slvnperron / HOWTO.md
Last active March 3, 2017 16:26
Migrating to Botpress 0.1

Migrating to Botpress Beta 0.1

This will guide will help you to migrate your existing bots from Botpress v0.0 to v0.1.

Before you migrate

The following database tables will be lost:

  • botpress-analytics: all analytics
  • botpress-subscription: all subscriptions
  • botpress-schedulers: all schedules (past & next)
  • botpress-hitl: all messages and sessions