- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
Copy public key to .ssh/authorized_keys inside Vagrant vm:
Vagrant.configure("2") do |config|
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
config.ssh.private_key_path = ["~/.vagrant.d/insecure_private_key", "~/.ssh/id_rsa"]
config.ssh.insert_key = false
end
``
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile for python code | |
# | |
# > make help | |
# | |
# The following commands can be used. | |
# | |
# init: sets up environment and installs requirements | |
# install: Installs development requirments | |
# format: Formats the code with autopep8 | |
# lint: Runs flake8 on src, exit if critical rules are broken |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ansible import playbook, callbacks | |
# uncomment the following to enable silent running on the playbook call | |
# this monkey-patches the display method on the callbacks module | |
# callbacks.display = lambda *a,**ka: None | |
# the meat of the meal. run a playbook on a path with a hosts file and ssh key | |
def run_playbook(playbook_path, hosts_path, key_file): | |
stats = callbacks.AggregateStats() | |
playbook_cb = callbacks.PlaybookCallbacks(verbose=0) |
Arquivo de configuração alternativo do postgresql. Sobressai sobre o /etc/postgresql/12/main/postgres.conf
sudo nvim /var/lib/postgresql/14/main/postgresql.auto.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def soma(a, b): | |
# ignora apenas a linha abaixo | |
soma = a + b # fmt: skip | |
return soma | |
# ignora todo o bloco de codigo a abaixo | |
# fmt: off | |
def subtracao(a, b): | |
sub = a - b | |
return sub |
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
[!WARNING]
Instalar as libs separadamente (python 3.8)
pip install --no-binary lxml lxml==4.6.3
pip install --no-binary xmlsec xmlsec
Instalar as libs separadamente (python 3.10)
pip install --no-binary lxml==4.6.3 lxml==4.6.3 --force-reinstall
pip install --no-binary xmlsec==1.3.13 xmlsec==1.3.13
Arquivo original: https://stackoverflow.com/questions/20518632/importerror-numpy-core-multiarray-failed-to-import Erro de instalação pacote numpy. Corrigir com:
pip install numpy --upgrade --ignore-installed