Skip to content

Instantly share code, notes, and snippets.

View guilhermebkel's full-sized avatar
👨‍🏫
programming and mentoring

Guilherme Mota guilhermebkel

👨‍🏫
programming and mentoring
View GitHub Profile
@guilhermebkel
guilhermebkel / index.js
Last active February 18, 2021 21:37
Instagram HTTP/Queue Integration
const { IgApiClient } = require("instagram-private-api")
const { withRealtime } = require("instagram_mqtt")
const fs = require("fs")
const INSTAGRAM_USERNAME = ""
const INSTAGRAM_PASSWORD = ""
const SESSION_FILE_PATH = "./session.json"
const SEQ_ID_FILE_PATH = "./seq_id.txt"
const formatMessage = (message) => ({
@guilhermebkel
guilhermebkel / index.js
Created June 28, 2020 14:41
Make picture background transparent
const { promisify } = require('util')
const { resolve } = require('path')
const fs = require('fs')
const readdir = promisify(fs.readdir)
const stat = promisify(fs.stat)
const sharp = require("sharp")
const replaceColor = require('replace-color')
async function process(path) {
if (path.includes("cards-raw")) {
@guilhermebkel
guilhermebkel / My Environment Setup
Last active November 12, 2021 11:48
My Environment Setup
Fira Code
Curl
VSCode
Git
Oh My Zsh
NVM
ntl (npm)
Node
Docker
DockerCompose
@guilhermebkel
guilhermebkel / 🐱 GitHub Data
Last active March 14, 2021 00:10
GitHub Data
🏆 1,457 Contributions in year 2021
📦 Used 375 MB in GitHub's Storage
📜 17 Public Gists
🔑 0 Public Keys
🚫 Not opted to Hire
@guilhermebkel
guilhermebkel / install.ssh
Created May 23, 2020 12:44
Install FireCode Ligature Font
sudo add-apt-repository universe
sudo apt-get update
sudo apt install fonts-firacode
@guilhermebkel
guilhermebkel / .zshrc
Last active June 29, 2020 22:24
Oh My Zsh Terminal
# Source Base Path
export ZSH="/home/guilhermebkel/.oh-my-zsh"
# Theme
ZSH_THEME="robbyrussell"
# Plugins
plugins=(
git
nvm
@guilhermebkel
guilhermebkel / .gitconfig
Last active October 5, 2020 20:06
Git Configuration
[user]
name = Guilherme Mota
email = guilhermebromonschenkel@gmail.com
[core]
editor = code --wait
[push]
followTags = true
[alias]
# Shows a status of the current modifications you did
s = !git status -s
@guilhermebkel
guilhermebkel / clean_cache.sh
Created February 27, 2020 10:08
Clean cache command
free -h && sudo sysctl -w vm.drop_caches=3 && sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -h
@guilhermebkel
guilhermebkel / folders_size.sh
Created February 7, 2020 16:25
Show folders size recursively
du -hsc *
@guilhermebkel
guilhermebkel / query.sql
Last active January 23, 2020 14:21
Updating single value inside json on postgres
/*
-> Supposing there's a table called 'sel_collections' and a column 'info' with the following format:
{ "total_pictures": 2, "total_size": 100 }
-> After making the command below, the value inside this column will be:
{ "total_pictures": 3, "total_size": 100 }
*/
UPDATE
sel_collections