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 / git-tag-delete-local-and-remote.sh
Last active February 6, 2023 17:44 — forked from mobilemind/git-tag-delete-local-and-remote.sh
[How to delete a git tag] How to delete a git tag locally and remote #git
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@mstuttgart
mstuttgart / tutorial.md
Last active July 13, 2024 12:38
[Bloquiar edição de arquivo] Bloqueia a edição de arquivo via senha #linux

Para bloquear um arquivo:

chattr +i arquivo

Para bloquear um diretório:

chattr +i diretorio/

Para liberar um arquivo:

@mstuttgart
mstuttgart / logitech-mx-master-3-extras-for-linux-with-logiops.md
Last active June 3, 2023 18:36 — 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:

" 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 / 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:

@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 / 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 / README.md
Last active May 6, 2024 12:42
README

banner

About Me

@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 / 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'