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
local random = math.random | |
local function uuid() | |
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | |
return string.gsub(template, '[xy]', function (c) | |
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb) | |
return string.format('%x', v) | |
end) | |
end |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font"> | |
<edit name="antialias" mode="assign"><bool>true</bool></edit> | |
</match> | |
<match target="font"> | |
<edit name="hintstyle" mode="assign"><const>hintnone</const></edit> | |
</match> | |
<match target="font"> |
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
import wget | |
import os | |
# Get the list of all the files in current directory | |
files = [f for f in os.listdir('.') if os.path.isfile(f)] | |
# Read from file. File contains list of links. All links in new line. | |
links = open("inputurl.in", "r") | |
i = 0 |
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 | |
# According to: | |
# How To Set Up Python 2.7.6 and 3.3.3 on CentOS 6.4 | |
# https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4 | |
yum -y update | |
yum groupinstall -y 'development tools' | |
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel | |
yum install xz-libs | |
wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz |
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
#sample-deployment.yaml | |
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
replicas: 3 | |
template: | |
metadata: |
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
###### cat sample-services.yaml | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: my-service | |
spec: | |
type: LoadBalancer | |
loadBalancerIP: 10.10.10.1 | |
ports: |
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
## To view Nodes in a cluster | |
$kubectl get nodes | |
NAME STATUS AGE | |
gke-test-cluster-default-pool-2d123aa1-012f Ready 2d | |
gke-test-cluster-default-pool-2d123aa1-e23k Ready 2d | |
## To view the Deployment we created run: | |
$ kubectl get deployments |
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
Convention | |
# RAM : Mi = MB, ie, 1024Mi is 1024 MB or 1GB | |
# CPU : m = milicpu , ie, 100m cpu is 100 milicpu, or say 0.1 CPU | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: cpu-ram-demo | |
spec: | |
containers: |
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
#-------------- Node selector example | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: nginx | |
labels: | |
env: test | |
spec: | |
containers: |
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
I have three file in my directory named 'flask' : | |
➜ flask | |
── app.py | |
── Dockerfile | |
── requirement.txt | |
#---------------------------------------------- | |
$ cat app.py |
OlderNewer