This file contains 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
isTrue = False | |
a = 4 | |
b = 2.5 | |
strOne = "One" | |
strThree = "Three" | |
if a < b: | |
print("a is smaller than b") | |
else: | |
print("a is not smaller than b") |
This file contains 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
def square(number): | |
return number*number | |
def sum_list(list_to_sum): | |
sum = 0 | |
for number in list_to_sum: | |
sum = sum + number | |
return sum |
This file contains 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
#!/bin/bash |
This file contains 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
version: '3.3' | |
services: | |
db: | |
image: nginx:alpine | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress |
This file contains 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
kubectl run nginx --image=nginx:1.15.12-alpine --generator=run-pod/v1 | |
kubectl run redis --image=redis:5.0.4-alpine --generator=run-pod/v1 | |
kubectl logs redis | |
kubectl describe pod redis | |
kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node | |
kubectl get deployments | |
kubectl describe deployment hello-node | |
kubectl get pods | |
kubectl scale deployment/hello-node --replicas=3 |
This file contains 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
kubectl apply -f pod-empty-dir.yaml | |
kubectl create configmap game-config --from-file=configure-pod-container/configmap/ | |
kubectl describe configmap game-config | |
kubectl exec -it pod-env-var cat /app/game.properties | |
kubectl exec -it pod-env-var env | |
kubectl apply -f pv.yaml | |
kubectl apply -f pvc.yaml | |
kubectl apply -f pod-with-pvc.yaml | |
in minikube machine: echo “hello from the other side” > /data/pv0001/index.html |
This file contains 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
yum install docker -y | |
systemctl enable docker | |
systemctl start docker | |
docker run -d --name docker-nginx -p 80:80 nginx | |
aws ec2 describe-instances --filters "Name=instance-type,Values=t2.micro" --query "Reservations[].Instances[].PublicDnsName" --output text | |
aws ec2 describe-instances --filters "Name=instance-type,Values=t2.micro" --query "Reservations[].Instances[].InstanceId" --output text |
This file contains 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
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -p 3306:3306 -d mysql:5.7 | |
SELECT * | |
FROM `1703`.users; | |
INSERT | |
INTO `1703`.users | |
VALUES ("Moshe","ben david", 50); | |
UPDATE `1703`.users |
This file contains 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
docker pull nginx:1.15.12-alpine | |
docker run --name my-nginx -d -p 80:80 nginx:1.15.12-alpine | |
docker ps | |
go to localhost or 192.168.99.100 | |
################ | |
docker build -t my-first-image . | |
docker run --name my-frst-container my-first-image | |
################ | |
docker network create wordpress | |
docker container run --name mysql-container --rm --network wordpress -e MYSQL_ROOT_PASSWORD=wordpress -d mysql:5.7 |
This file contains 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
https://api.github.com/users/avielb/repos | |
import requests | |
myrequest = requests.get("https://free.currencyconverterapi.com/api/v6/convert?q=USD_ILS&compact=n&apiKey=72a1f59a5bf27c222c80") | |
################################################################ | |
import requests |