Skip to content

Instantly share code, notes, and snippets.

View JonathRocha's full-sized avatar
🚀
Keep coding!

Jonathan Rocha JonathRocha

🚀
Keep coding!
  • Brazil
View GitHub Profile
@JonathRocha
JonathRocha / action.js
Created August 23, 2021 13:38
Botpress PDF fix
function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) {
const myAction = async () => {
const message = {
type: 'file',
text: 'texto a ser exibido antes do arquivo!',
url: 'Url do arquivo',
mediaType: 'application/pdf' // Mime type
}
@JonathRocha
JonathRocha / settings.json
Created July 28, 2020 23:03
VSCode Settings
{
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// https://askubuntu.com/a/51953
// If you want all new files in a particular directory to be owned by a particular group, just apply the setgid bit on it:
chgrp www-data /some/dir
chmod g+s /some/dir
// If you have an existing tree of directories that you want to apply this behaviour to, you can do so with find:
find /some/dir -type d -exec chgrp www-data {} +
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]$ "