sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
#!/usr/bin/env groovy | |
/** | |
* List all Git branches of a repo. | |
* @author thabet.amer@gmail.com | |
* @since Jenkins 2.204.1 | |
* @params String url for Git repo URL, String credentialID, Bool activeChoice if ActiveChoice plugin used, String defaultBranch | |
* @return String array of branch names | |
* | |
* Dependencies: |
# Fabfile to: | |
# - update the remote system(s) | |
# - download and install an application | |
from fabric import Connection | |
from fabric import task | |
import os | |
import environ | |
root = environ.Path(__file__) - 1 # one folder back (/manage - 3 = /) |
# Board | |
# https://s.click.aliexpress.com/e/_9IDl91 | |
# ESPHome docs: | |
# - https://esphome.io/components/display/waveshare_epaper.html | |
# - https://esphome.io/components/spi.html#spi | |
# - https://esphome.io/components/display/index.html#formatted-text | |
substitutions: | |
esphome_name: esp32_ttgo_t5 |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
// This script will remove all videos from watch later list | |
// | |
// Usage | |
// | |
// #1 go to https://www.youtube.com/playlist?list=WL | |
// #2 run following script | |
// adjust REMOVE_BUTTON_TEXT_MAP if your language is missing | |
(async function() { | |
const REMOVE_BUTTON_TEXT_MAP = { |
session_start(); | |
$timeout = 600; // Tempo da sessao em segundos | |
// Verifica se existe o parametro timeout | |
if(isset($_SESSION['timeout'])) { | |
// Calcula o tempo que ja se passou desde a cricao da sessao | |
$duracao = time() - (int) $_SESSION['timeout']; | |
// Verifica se ja expirou o tempo da sessao | |
if($duracao > $timeout) { |
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
O uso de repositórios GIT tem diversos benefícios: trabalho em equipe, desenvolvimento de recursos separadamente, histórico das alterações, etc. Mas para disponibilizar todo o potencial é preciso um pouco de dedicação no momento do commit.
Não é preciso uma vasta experiência para já ter passado por situações como conflito de arquivos onde a mensagem não traz nenhuma informações relevante e é preciso inverstigar o que a outra pessoa estava desenvolvendo ou após