Below steps will help to configure sonarlint to connect to sonarqube.
- OS: Mac
- Java: Azul Zulu11 OpenJDK
- VS Code
- Sonarlint Extension
Meaningful Names: Name variables and functions to reveal their purpose, not just their value. | |
One Function, One Responsibility: Functions should do one thing. | |
Avoid Magic Numbers: Replace hard-code values with named constants to give them meaning. | |
Use Descriptive Booleans: Boolean names should state a condition, not just its value. | |
Keep Code DRY: Duplicate code means duplicate bugs. Try and reuse logic where it makes sense. |
yarn cache clean | |
pod cache clean --all | |
rm -rf ~/Library/Caches/CocoaPods | |
rm -rf Pods | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
pod deintegrate | |
pod setup |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: nginx | |
annotations: | |
ingress.kubernetes.io/ssl-redirect: "false" | |
spec: | |
rules: | |
- http: | |
paths: |
/** | |
* Script to parse a Postman backupt to Insomnia keeping the same structure. | |
* | |
* It parses: | |
* - Folders | |
* - Requests | |
* - Environments | |
* | |
* Notes: Insomnia doesn't accept vars with dots, if you are using you must replace yours URLs manually (see ENVIRONMENTS_EXPORTS). | |
*/ |
#!/bin/sh | |
sudo yum upgrade | |
# list kernals (old + current) | |
rpm -q kernel | |
# verify current kernal | |
uname -a |
"scripts": { | |
"android": "npm i && react-native run-android", | |
"clean": "(cd android && ./gradlew clean) && (cd ios && xcodebuild clean)", | |
"ios": "npm i && npm run ios:pods && react-native run-ios --port 8098 --simulator='iPhone 14 Pro' ", | |
"ios:pods": "(cd ios && pod install)", | |
"ios:pods:update": "(cd ios && pod install --repo-update)", | |
"reset": "watchman watch-del-all && react-native start --reset-cache", | |
"start": "react-native start --port 9988 --reset-cache", | |
"lint": "eslint . --ext .js,.jsx,.ts,.tsx" | |
}, |
# Count total EBS based storage in AWS | |
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
# Count total EBS storage with a tag filter | |
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
# Describe instances concisely | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
# Wait until $instance_id is running and then immediately stop it again | |
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
# Get 10th instance in the account |
To turn the firewall off : | |
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 0 | |
To turn the firewall on for specific applications/services : | |
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1 | |
To turn the firewall on for essential services like DHCP and ipsec, block all the rest : | |
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 2 |
du -sh * | sort -h ----- list directories and their total sizes and sort based on size |