Skip to content

Instantly share code, notes, and snippets.

View arvati's full-sized avatar
💭
Studying online

Ademar Arvati arvati

💭
Studying online
View GitHub Profile
@arvati
arvati / .wsl-git.md
Created May 21, 2023 23:44 — forked from carlolars/.wsl-git.md
HOWTO: Use WSL and its Git in a mixed development environment

How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.

Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.

Tools

These are the tools I use:

  • git (wsl) - Command line git from within WSL.
  • Fork (windows) - Git GUI (must be used with wslgit)
  • wslgit - Makes git from WSL available for Windows applications. Important! Follow the installation instructions and do (at least) the first optional step and then the Usage in Fork instructions.
@arvati
arvati / .syslog-ng.md
Last active February 26, 2022 08:59 — forked from mbernson/README.md
Publish openwrt log contents to MQTT

Router logging to MQTT

This configuration sends all (or part of) your OpenWRT logs to a MQTT broker. I'm writing it up here for future reference.

I made this so I can keep track of wireless clients as they associate and disassociate with my home network. This way, my home automation setup can make decisions based on that information. :)

Installation

@arvati
arvati / . Qemu networking using TAP Interface on Windows 10.md
Last active February 28, 2024 03:23 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@arvati
arvati / .config pass tools browserpass and qtpass using windows wsl wrappers.md
Last active June 27, 2023 01:05 — forked from christian-weiss/passInWslBashWrapper.bat
pass tools browserpass and qtpass using windows wsl wrappers

pass tools browserpass and qtpass using windows wsl wrappers

Inside wsl Alpine v3.12

sudo apk update
sudo apk add browserpass pass nano
cd ~/
wget https://gist.github.com/arvati/1d9ae3091017e3ba1209fd76552cd344/raw/44c4af0f86e056e94954580943d2980741f02ff5/pinentry-wsl-ps1.sh
chmod ug=rx pinentry-wsl-ps1.sh
#echo "pinentry-program /home/$USER/pinentry-wsl-ps1.sh" >> ~/.gnupg/gpg-agent.conf
echo "pinentry-program \"/mnt/c/Program Files/Git/usr/bin/pinentry.exe\"" >> ~/.gnupg/gpg-agent.conf
@arvati
arvati / screen.md
Created June 20, 2020 17:14 — forked from fredrick/screen.md
GNU Screen Cheat Sheet

#GNU Screen Cheat Sheet

##Basics

  • ctrl a c -> cre­ate new win­dow
  • ctrl a A -> set win­dow name
  • ctrl a w -> show all win­dow
  • ctrl a 1|2|3|… -> switch to win­dow n
  • ctrl a " -> choose win­dow
  • ctrl a ctrl a -> switch between win­dow
  • ctrl a d -> detach win­dow

SMBNetFS

Install and setup

sudo apt-get install smbnetfs
mkdir ~/.smb
cp /etc/smbnetfs/smbnetfs.conf ~/.smb
cp /etc/samba/smb.conf ~/.smb
@arvati
arvati / self-signed-certificate-with-custom-ca.md
Created June 11, 2020 20:13 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@arvati
arvati / generate-ssh-key.sh
Created May 23, 2020 19:34 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@arvati
arvati / Como atualizar fork com as mudanças do original.md
Last active May 17, 2020 18:18 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?

Como atualizar fork com as mudanças do original

Adicione um novo remote; pode chamá-lo de "upstream":

git remote add upstream https://github.com/usuario/projeto.git

Obtenha todos os branches deste novo remote, como o upstream/master por exemplo:

git fetch upstream

Certifique-se de que você está no branch master:

@arvati
arvati / alpine_motd_generator.md
Last active February 8, 2024 10:56 — forked from ergoz/motd_generator.sh
Dynamic motd generator for Alpine Linux (/etc/periodic/15min/motd)

Make a dynamic motd for your server

create a crond script to dynamic create an motd message to users

rc-service crond start && rc-update add crond
nano /etc/periodic/15min/motd
chmod a+x /etc/periodic/15min/motd
run-parts --test /etc/periodic/15min

Contents of /etc/periodic/15min/motd