Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
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
| upload(files) { | |
| const config = { | |
| onUploadProgress: function(progressEvent) { | |
| var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
| console.log(percentCompleted) | |
| } | |
| } | |
| let data = new FormData() | |
| data.append('file', files[0]) |
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
| use actix_service::{Service, Transform}; | |
| use actix_web::{dev::ServiceRequest, dev::ServiceResponse, Error}; | |
| use futures::future::{ok, FutureResult}; | |
| use futures::{Future, Poll}; | |
| use slog::info; | |
| // There are two step in middleware processing. | |
| // 1. Middleware initialization, middleware factory get called with | |
| // next service in chain as parameter. | |
| // 2. Middleware's call method get called with normal request. |
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
| #!/usr/bin/env bash | |
| NODESAPI=/api/v1/nodes | |
| function getNodes() { | |
| kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name' | |
| } | |
| function getPVCs() { | |
| jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\ |
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
| # Source: https://gist.github.com/6fb3e7da327df9203d9d4c184fcb5831 | |
| ############################################################################## | |
| # Combining Argo CD (GitOps), Crossplane (Control Plane), And Kubevela (OAM) # | |
| # https://youtu.be/eEcgn_gU3SM # | |
| ############################################################################## | |
| # Referenced videos: | |
| # - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4 | |
| # - Cloud-Native Apps With Open Application Model (OAM) And KubeVela: https://youtu.be/2CBu6sOTtwk |
OlderNewer