Skip to content

Instantly share code, notes, and snippets.

View mstuttgart's full-sized avatar
🏠
Working from home

Michell Stuttgart mstuttgart

🏠
Working from home
View GitHub Profile
@mstuttgart
mstuttgart / update.sh
Created April 24, 2024 13:58
Trying to upgrade from 18.04 to 20.04, “Your python3 install is corrupted”
# comand from: https://askubuntu.com/questions/1267534/trying-to-upgrade-from-18-04-to-20-04-your-python3-install-is-corrupted
sudo ln -fs /usr/bin/python3.6 /usr/bin/python3
@mstuttgart
mstuttgart / make_certificate.py
Last active April 23, 2024 20:55
Create PKCS12 (.efx) in Python
# code from: https://stackoverflow.com/a/77080460/6085378
from datetime import datetime, timedelta
from cryptography import x509
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives.serialization import (
BestAvailableEncryption,
PrivateFormat,
@mstuttgart
mstuttgart / bootstrap-db.py
Created March 26, 2024 14:50 — forked from sebalix/bootstrap-db.py
Bootstraping Odoo database (8.0)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to bootstrap an Odoo database (8.0)."""
import odoorpc
# Odoo connection
SUPER_PWD = 'admin'
HOST = 'localhost'
PORT = 8069
DB = 'my_db'
@mstuttgart
mstuttgart / tutorial.md
Last active September 20, 2023 19:47
Set Pop Shell like i3

Original post: pop-os/shell#142 (comment)

As for how to implement this feature, here is what I've done myself. First, enable a static number of workspaces (e.g. 8 or 10):

gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 6

Then unbind all the GNOME default keybindings for switching between applications:

@mstuttgart
mstuttgart / README-short.md
Last active February 17, 2025 14:00
README

Hi there, I'm Michell 👋

🚀 About Me

I'm a some sort of developer who enjoys building software. I love exploring new technologies and crafting useless apps.

if I set a repository as public, that means I'm not going to fix it..

🔧 Tech Stack

  • Languages: Rust, TypeScript, JavaScript, SQL, Bash
  • Frameworks & Tools: Angular, Express.js, Actix, Electron and Tauri (beginner)
@mstuttgart
mstuttgart / task.yml
Created April 13, 2023 18:24 — forked from maxim/task.yml
Adding github to known_hosts with ansible
- name: ensure github.com is a known host
lineinfile:
dest: /root/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"
@mstuttgart
mstuttgart / copiar_chave_ssh.md
Last active June 5, 2023 14:06
[Restaurar chaves SSH] Restaurando chaves SSH após backup #linux #ssh

Copie ambos os arquivos id_rsa e id_rsa.pub para o diretório ~/.ssh/.

Em seguida, altere as permissões e o proprietário dos arquivos

$ chown user:user ~/.ssh/id_rsa*
$ chmod 600 ~/.ssh/id_rsa
$ chmod 644 ~/.ssh/id_rsa.pub
@mstuttgart
mstuttgart / tutorial.md
Last active February 6, 2023 20:11
[Verificando espaço em disco] Comandos úteis para verificar espaço disponível em disco e em um dado diretorório #linux #hardware

Verificando espaço em disco

Comando df: espaço em um sistema de arquivos

Para mostrar informações sobre os sistemas de arquivo nos quais cada ARQUIVO reside ou, por padrão, sobre todos os sistemas de arquivos, podemos utilizar o comando df.

Para checar o espaço em disco ocupado pelo diretório /tmp e /opt, usamos o comando du:

" vim-plug pluggin
let g:plugged_home = '~/.config/nvim/plugged'
"------------ Plugins list ----------------
" Plugins List
call plug#begin(g:plugged_home)
" UI related
Plug 'scrooloose/nerdtree'
@mstuttgart
mstuttgart / logitech-mx-master-3-extras-for-linux-with-logiops.md
Last active August 12, 2025 22:13 — forked from johnathanmay/logitech-mx-master-3-extras-for-linux-with-logiops.md
[Configurando mouse Logitech MX Master 3] Como Configur botões de atalho no Linux. #linux #hardware

Logitech MX Master 3 Extras for Linux With logiops

The Logitech Options program isn't available for Linux, but a nice hacker on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.

Here are some additional pages with info that I used to generate this documentation: