sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
-- An audit history is important on most tables. Provide an audit trigger that logs to | |
-- a dedicated audit table for the major relations. | |
-- | |
-- This file should be generic and not depend on application roles or structures, | |
-- as it's being listed here: | |
-- | |
-- https://wiki.postgresql.org/wiki/Audit_trigger_91plus | |
-- | |
-- This trigger was originally based on | |
-- http://wiki.postgresql.org/wiki/Audit_trigger |
{ | |
"gcp": { | |
"topic_1": { | |
"copy-a-file-from-gcp-vm-to-local-machine": "scp -i ~/.ssh/my-ssh-key [LOCAL_FILE_PATH] [USERNAME]@[IP_ADDRESS]:~", | |
"copy-a-file-from-local-machine-to-gcp-vm": "scp -i ~/.ssh/my-ssh-key [USERNAME]@[IP_ADDRESS]:[REMOTE_FILE_PATH] [LOCAL_FILE_PATH]", | |
"link_ref": "https://cloud.google.com/compute/docs/instances/transfer-files#transferbrowser" | |
}, | |
"topic_2": { | |
"connecting-to-instances-on-gcp": "gcloud compute ssh --project [PROJECT_ID] --zone [ZONE] [INSTANCE_NAME]", | |
"link_ref": "https://cloud.google.com/compute/docs/instances/connecting-to-instance" |
{ | |
"command": { | |
"run": "git reset --hard origin/<branch>", | |
"description": "Sure you are on the branch where the commit is" | |
} | |
} |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct tipoNo { | |
int valor; | |
char op; | |
struct tipoNo *esq; | |
struct tipoNo *dir; | |
} tipoNo; | |
/<expressão> => começa a procura pelo início do arquivo do termo "expressão"
?<expressão> => começa a procura pelo final do arquivo do termo "expressão"
n => procura a próxima palavra
N => inverte o sentido da procura
:3,9d => apaga as linhas de 3 a 9
1 - Ao adicionar um documento (dicionário) no Elasticsearch utilizando o método:
for ok, result in streaming_bulk(self.client, self.start_data_streaming(),
index=self.index_name, doc_type=self.doc_type,
chunk_size=self._CHUNK_SIZE):
action, result = result.popitem()
doc_id = '/%s/doc/%s' % (self.index_name, result['_id'])
Por exemplo:
Uma boa prática é ao capturar exceções, mencionar sempre que possível as exceções específicas, em vez de usar apenas except Exception
. Exemplo:
try:
import platform_specific_module
except ImportError:
platform_specific_module = None
import urllib.parse | |
def urlencode(str): | |
return urllib.parse.quote(str) | |
def urldecode(str): | |
return urllib.parse.unquote(str) | |
str = '{"name": "Kinkin"}' |
# Use TODO to note missing features or functionality that should be added at a later date. | |
# Use FIXME to note broken code that needs to be fixed. | |
# Use OPTIMIZE to note slow or inefficient code that may cause performance problems. | |
# Use HACK to note code smells where questionable coding practices were used and should be refactored away. | |
# Use REVIEW to note anything that should be looked at to confirm it is working as intended. |