Skip to content

Instantly share code, notes, and snippets.

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

Gustavo Mathias Rocha gustavo8000br

🏠
Working from home
  • Cotia, São Paulo
View GitHub Profile
@gustavo8000br
gustavo8000br / update_all_trunks.bat
Last active April 1, 2022 19:00
Tool for update all TRUNK'S of one project.
@ECHO OFF
TITLE Tool update all TRUNK of this project
CLS
ECHO Updating trunk of SVN project
ECHO ==============================
FOR /d %%i IN (TRUNK) DO (
IF EXIST "%%i\.svn" (
ECHO DIRECTORY: %%i
CMD /c "cd %%i && svn update"
ECHO ==============================
Rede WPA/WPA2-PSK
Bem, este processo também é simples, apesar de muitos artigos e tutoriais o complicarem muitas vezes.
Supondo que você já saiba a senha da rede em questão, vamos começar!
Primeiro devemos criar um arquivo de configuração. Calma, mais simples que isto, impossível:
wpa_passphrase nome da rede > /caminho/do/arquivo.conf
Após executar este comando, o terminal irá esperar pela entrada da senha da conexão. Digite-a e pressione enter.
@gustavo8000br
gustavo8000br / wifi-on-ubuntu-server-18.md
Created April 2, 2020 18:45 — forked from austinjp/wifi-on-ubuntu-server-18.md
Enabling wifi on Ubuntu server 18

Wifi on Ubuntu 18 server

TLDR

  1. Install wpasupplicant
  2. Turn on wifi radios: sudo nmcli radio wifi on
  3. Check your devices are recognised even if they're not "managed": sudo iwconfig
  4. Check your wifi (here called "wlp3s0") is capable of detecting nearby routers: sudo iwlist wlp3s0 scan
  5. Configure netplan by dropping a file called 01-netcfg.yaml into /etc/netplan/ or edit existing file there. See example below.
  6. netplan try, netplan generate, netplan apply.
@gustavo8000br
gustavo8000br / portainer-agent-stack.yml
Created February 11, 2020 04:54
Run ``docker swarm init`` then ``docker swarm join --token <TOKEN_HERE> <IP_SWARM_MANAGER:PORT>`` then ``docker stack deploy --compose-file=portainer-agent-stack.yml portainer``
version: '3.5'
services:
agent:
image: portainer/agent
environment:
# REQUIRED: Should be equal to the service name prefixed by "tasks." when
# deployed inside an overlay network
AGENT_CLUSTER_ADDR: tasks.agent
AGENT_PORT: 9001