Skip to content

Instantly share code, notes, and snippets.

View LaisGalvao's full-sized avatar
🎯
Focusing

Laís Galvão LaisGalvao

🎯
Focusing
View GitHub Profile
@infoslack
infoslack / main.py
Last active November 21, 2023 16:01
Technical interview helper
# dependencies
# pip install -U openai gradio
import os, openai
import gradio as gr
openai.api_key = 'sk-xxxxxx'
messages = [{"role": "system", "content": """Assistant is an expert candidate in
technical IT job interviews. Currently, the interview is
focused on a position for Platform Engineer. So, you have skills
@Nick-Gabe
Nick-Gabe / Pombify.js
Last active January 6, 2024 01:57
Transforma uma string em pombês, e traduz para a língua dos humanos.
const pombify = (phrase) => {
return phrase
.split(' ')
.map((word) => {
const wordLetters = word.split('')
return wordLetters
.map((letter, index) => {
const charCode = letter.charCodeAt(0);
const binary = charCode
.toString(2)
@kristoferjoseph
kristoferjoseph / single-file-web-component.html
Last active November 22, 2023 01:17
Single file Web Component
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Single File Web Component</title>
</head>
<body>
<template id=single-file>
<style>
h1 {
@maykbrito
maykbrito / vscode_shortcuts.md
Last active June 1, 2024 03:04
Alguns atalhos do VSCode que eu uso.

Atalhos VSCode

Alguns atalhos que uso no VSCode durante as aulas

Abrir/Fechar - Ver

Funcionalidade Windows Mac Linux
Todos os atalhos Ctrl+K Ctrl+S ⌘K ⌘S Ctrl+K Ctrl+S
Lista de Comandos Ctrl+Shift+P ⇧⌘P Ctrl+Shift+P
Terminal Integrado Ctrl+` ⌃` Ctrl+`
@baptx
baptx / instagram-api_send_message.js
Last active May 29, 2024 08:21
Instagram API: send direct messages from a web browser
/*
Instagram API: send direct messages from a web browser
Since April 2020, Instagram has a web version to send and read direct messages so my Instagram scripts are not longer needed and I would not recommend using them unless you really need it, to avoid being banned
(never happened to me with Instagram but WhatsApp is owned by Facebook also and they did it to users registering from an unofficial app like yowsup: https://github.com/tgalal/yowsup/commit/88b8ad9581fa22dac330ee3a05fec4e485dfa634#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5)
For browser setup, see script instagram-api_direct_messages_backup.js
Instagram web version sessionid cookie does not allow sending messages so we need to log in manually
Signature should match signed_body data (using HMAC-SHA256 with private key) but wrong signature or key may work also.
@dekadentno
dekadentno / purgecss.js
Last active May 6, 2022 17:06
Vue CLI 3 + PurgeCSS
/**
1) npm i -D purgecss @fullhuman/postcss-purgecss purgecss-webpack-plugin glob-all path
2) edit vue.config.js
*/
/**
** vue.config.js
*/
const PurgecssPlugin = require('purgecss-webpack-plugin');
const glob = require('glob-all');
@trgomes
trgomes / Deploy heroku - laravel
Created January 5, 2018 00:20
Deploy de uma aplicação laravel no heroku
*Pré requisitos *********
=> git instalado
=> heroku cli instalado
=> aplicação gerenciada pelo git
*************************
#Login no heroku
heroku login
#Criando aplicação
@eltonea
eltonea / semantic-commit.txt
Last active May 2, 2024 22:53
Exemplos de commit semântico
chore: add Oyster build script //Pequenas alterações que não são novas funcionalidades.
docs: explain hat wobble //Semelhante a uma wiki; documentações etc.
feat: add beta sequence //Criação de Nova funcionalidade;
fix: remove error message //Correção de bugs
refactor: share logic 4d3d3d3 //Refatoração de um código
style: convert tabs to spaces //Alteração em estilos, formatação de código etc.
test: ensure that increment //Criação de testes da sua aplicação
const puppeteer = require('puppeteer');
class Webpage {
static async generatePDF(url) {
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode.
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle', networkIdleTimeout: 5000 }); // Adjust network idle as required.
const pdfConfig = {
path: 'url.pdf', // Saves pdf to disk.
format: 'A4',