- Extract tar file and place it in
/usr/local
. E.g.: tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz - Edit your $HOME/.profile adding
export PATH=$PATH:/usr/local/<extracted folder>
. source .profile
.
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
Disable-BitLockerAutoUnlock -MountPoint "E:" | |
Lock-Bitlocker -MountPoint "E:" |
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
helm repo add [name] [url] | |
helm repo update | |
helm repo list | |
helm install [chart-name] [repo-name/chart] | |
helm show chart [repo-name/chart] | |
helm show values ... | |
helm ls -n [some-namespace] | |
helm upgrade [chart-name] [repo-name/chart] | |
# Deployment |
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
az aks get-credentials -g <resourceGroup> -n <clusterName> | |
kubectl create namespace [namespacenamehere] | |
kubectl config set-context --current --namespace=[namehere] | |
kubectl exec --stdin --tty [podname] -- [command] | |
kubectl create -f samplePod.yml | |
kubectl logs pods/[podname] | |
kubectl apply -f deployment.yml --record | |
kubectl rollout stauts deployment [namehere] | |
kubectl rollout history deployment [namehere] | |
kubectl undo deployment [namehere] --to-revision=1 |
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
import yaml | |
import base64 | |
# Assumes sample.yml will have a data: entry | |
if __name__ == '__main__': | |
with open('sample.yml', 'r') as fh: | |
stream = fh.read() | |
data = yaml.safe_load(stream) | |
for key, value in data['data'].items(): | |
encoded = base64.b64encode(str(value).encode('utf-8')).decode('utf-8') |
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
pip install coverage | |
coverage run --omit 'venv/*' -m pytest | |
coverage report -m |
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
apt list | grep jdk | |
sudo apt remove <program-name-here> |
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
ssh-keygen -b 4096 -t rsa -C <[email protected]> |
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
sudo dpkg -i <installer>.deb |
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
# Not sure why some of them appear repeated but sometimes they do. | |
# Since there is a limit of 1024 chars to the SETX command, this sometimes comes in handy. | |
import os | |
path = os.environ['PATH'] | |
elements = path.split(';') | |
elements = set(elements) | |
new_path = '' | |
for item in elements: | |
new_path+='{};'.format(item) |
NewerOlder