Install an Ubuntu version from Microsoft Store.
- Ubuntu - Ubuntu (latest)
- Ubuntu 18.04 - Ubuntu 18.04
- Ubuntu 16.04 - Ubuntu 16.04
Please check out the Windows 10 Installation Guide written by Microsoft itself.
| Setup Gmail' send as | |
| https://community.cloudflare.com/t/solved-how-to-use-gmail-smtp-to-send-from-an-email-address-which-uses-cloudflare-email-routing/382769 |
Install an Ubuntu version from Microsoft Store.
Please check out the Windows 10 Installation Guide written by Microsoft itself.
| # https://stackoverflow.com/questions/53472429/how-to-get-a-gcp-bearer-token-programmatically-with-python | |
| def get_access_token(): | |
| creds, _project = google.auth.default() | |
| # creds.valid is False, and creds.token is None | |
| # Need to refresh credentials to populate those | |
| auth_req = google.auth.transport.requests.Request() | |
| creds.refresh(auth_req) | |
| return creds.token |
Tutte le chiamate alle API di Google necessitano di autenticazione OAuth2.
Se la mia applicazione usa queste API ed è eseguita in un ambiente diverso dal mio PC (dove in genere sono autenticato con la mia utenza personale), allora è necessario un service account.
Il service account è di fatto un'identità (authentication).
L'accesso a specifiche API da parte del service account dipende dai permessi che gli verranno assegnati (authorization).
| SELECT pg_terminate_backend(pg_stat_activity.pid) | |
| FROM pg_stat_activity | |
| WHERE pg_stat_activity.datname = 'YOURDATABASE' -- change this to your DB | |
| AND pid <> pg_backend_pid(); | |
| -- DROP DATABASE "YOURDATABASE" ; |
| # this creates a git-friendly kubeconfig for GKE | |
| # kudos: https://ahmet.im/blog/authenticating-to-gke-without-gcloud/ | |
| # please note GOOGLE_APPLICATION_CREDENTIALS is required where you will run kubectl | |
| PROJECT= | |
| CLUSTER= | |
| REGION=europe-west1 | |
| SERVER=`gcloud container clusters describe ${CLUSTER} --region ${REGION} --project ${PROJECT} --format='value(endpoint)'` | |
| CERT=`gcloud container clusters describe ${CLUSTER} --region ${REGION} --project ${PROJECT} --format='value(masterAuth.clusterCaCertificate)'` |
| ## https://github.com/istio/istio/issues/19263 | |
| ## https://github.com/istio/operator/pull/713/files#diff-f08ee0447ca8f6e9c8edf9f0551023e7R6 | |
| ## https://www.learncloudnative.com/blog/2020-01-09-deploying_multiple_gateways_with_istio/ | |
| ## https://istio.io/latest/docs/setup/install/istioctl/#patching-the-output-manifest | |
| apiVersion: install.istio.io/v1alpha1 | |
| kind: IstioOperator | |
| spec: | |
| addonComponents: |
| # https://stackoverflow.com/questions/1390568/how-can-i-match-on-an-attribute-that-contains-a-certain-string | |
| //TAG_NAME[contains(concat(' ', normalize-space(@class), ' '), ' CLASS_VALUE ')] |
| #!/bin/bash | |
| PS_VERSON=1.7.5.1 | |
| prompt_confirm() { | |
| while true; do | |
| read -r -n 1 -p "${1:-Continue?} [y/n]: " REPLY | |
| case $REPLY in | |
| [yY]) echo ; return 0 ;; | |
| [nN]) echo ; return 1 ;; |
| # https://curl.haxx.se/docs/install.html | |
| wget https://curl.haxx.se/download/curl-7.61.1.tar.gz | |
| tar xzvf curl-7.61.1.tar.gz | |
| cd curl-7.61.1 | |
| ./configure --prefix=/opt/curl-7.61.1 | |
| make | |
| make install | |
| /opt/curl-7.61.1/bin/curl -V | |
| ln -s /opt/curl-7.61.1/bin/curl /usr/local/bin/curl |