Skip to content

Instantly share code, notes, and snippets.

//vocês vão comentar o que tá dentro do bloco if (!message.isGroupMsg) { } e colocar esse codigo aqui:
switch (message.text) {
case '1':
// client.sendText(message.from, "oi").then(() => {
// console.log('Message sent.');
// }).catch(error => console.error('Error when sending message', error));
client.sendVoice(message.from, './teste.mp3').then((result) => {
console.log('Result: ', result); //return object success
})
.catch((erro) => {
@michelssousa
michelssousa / init.lua
Created August 18, 2022 19:53 — forked from VonHeikemen/init.lua
nvim-lspconfig + nvim-cmp setup
--[[
blogpost:
https://vonheikemen.github.io/devlog/tools/setup-nvim-lspconfig-plus-nvim-cmp/
Dependencies:
LSP:
https://github.com/neovim/nvim-lspconfig
https://github.com/williamboman/mason.nvim (optional)
https://github.com/williamboman/mason-lspconfig.nvim (optional)
@michelssousa
michelssousa / app.py
Created July 8, 2022 17:16 — forked from Anishmourya/app.py
FLASK + S3 Presigned URLs + FIle upload to s3
from s3 import AwsS3UploadClass
from config import id_key
from config import secret_key
from config import bucket_name
from flask import Flask
from flask import jsonify
from flask import request
import requests
app = Flask(__name__)
@michelssousa
michelssousa / main.py
Created June 22, 2022 19:27 — forked from marnix135/main.py
Simple RSA implementation in Python
import random
import math
class RSA:
def __init__(self):
self.e = self.d = self.p = self.q = self.phi = 0
def __egcd(self, a, b):
if a == 0:
return (b, 0, 1)
@michelssousa
michelssousa / br.sh
Created February 27, 2022 21:48 — forked from dmkash/br.sh
Shell Script for tmux setup
#!/bin/sh
SESSION_NAME="big_red"
cd ~/Sites/within3/big_red
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
then