$ brew update && brew install kubectl && brew cask install docker minikube virtualbox
$ brew cask reinstall minikube
$ minikube delete
$ rm -fr ~/.minikube/
server config: | |
spring: | |
cloud: | |
dataflow: | |
security: | |
authorization: | |
provider-role-mappings: | |
scdf-test: | |
map-oauth-scopes: true | |
role-mappings: |
{"lastUpload":"2020-05-09T17:19:13.628Z","extensionVersion":"v3.4.3"} |
title | author |
---|---|
Error Handling in React 16 |
gaearon |
As React 16 release is getting closer, we would like to announce a few changes to how React handles JavaScript errors inside components. These changes are included in React 16 beta versions, and will be a part of React 16.
In the past, JavaScript errors inside components used to corrupt React’s internal state and cause it to emit cryptic errors on next renders. These errors were always caused by an earlier error in the application code, but React did not provide a way to handle them gracefully in components, and could not recover from them.
In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.
Here's one way to set it up:
- Install Node.js
- Run
npm init -y
in your project folder (don't skip this step!) - Run
npm install terser
Now, to minify a file called like_button.js
, run in the terminal:
# Installing gofabric8 | |
curl -sS https://get.fabric8.io/download.txt | bash | |
export PATH=$PATH:$HOME/.fabric8/bin | |
# Starting the cluster | |
gofabric8 start | |
gofabric8 start --vm-driver=virtualbox | |
gofabric8 start --memory=6000 --cpus=2 | |
# Validating your cluster | |
gofabric8 validate | |
# Using OpenShift |
$ git init | |
$ git add . | |
$ git commit -m "First commit" | |
$ git remote add origin https://github.com/Reddah-Cherara/rcherara-api-book-go.git | |
$ git remote -v | |
$ git push -u origin master | |
$ git push --force https://github.com/Reddah-Cherara/rcherara-api-book-go.git | |
$ git push -u origin master |
#!/bin/sh | |
# Install ufw | |
sudo apt install ufw | |
# Create setup_firewall.sh and run | |
chmod +x ./setup_firewall.sh | |
# Then run the script: | |
sudo ./setup_firewall.sh. |
#!/bin/bash | |
# Create a new user using Service Account mechanism of Kubernetes, | |
kubectl apply -f dashboard-adminuser.yaml | |
# Bearer Token | |
# Now we need to find token we can use to log in. | |
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}') | |
echo "Now copy the token and paste it into Enter token field on log in screen." |