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
#For PHP country Information | |
https://github.com/rinvex/country | |
#PHP enable CORS | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE'); |
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
(function () { | |
if (!angular) { | |
console.log('Not a angular application or window.angular not found'); | |
return; | |
} | |
var root = angular.element(document.getElementsByTagName('body')); | |
var watchers = []; |
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
function getWatchers(root) { | |
root = angular.element(root || document.documentElement); | |
var watcherCount = 0; | |
function getElemWatchers(element) { | |
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
var watchers = scopeWatchers.concat(isolateWatchers); | |
angular.forEach(element.children(), function (childElement) { | |
watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nfs-server | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
role: nfs-server | |
template: |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nfs-server | |
spec: | |
# clusterIP: 10.3.240.20 | |
ports: | |
- name: nfs | |
port: 2049 | |
- name: mountd |
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
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: nfs | |
spec: | |
capacity: | |
storage: 10Gi | |
accessModes: | |
- ReadWriteMany | |
nfs: |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nfs-busybox | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
name: nfs-busybox | |
template: |
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 | |
yum -y update | |
yum -y install net-tools wget telnet yum-utils device-mapper-persistent-data lvm2 | |
### Add Docker repository. | |
yum-config-manager \ | |
--add-repo \ | |
https://download.docker.com/linux/centos/docker-ce.repo -y |
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
apiVersion: kubeadm.k8s.io/v1beta1 | |
kind: ClusterConfiguration | |
kubernetesVersion: v1.14.3 # change according to kubeadm supported version | |
apiServer: | |
certSANs: | |
- 127.0.0.1 | |
- cluster-api.example.com # change according to your requirements | |
extraArgs: | |
authorization-mode: Node,RBAC | |
feature-gates: "TTLAfterFinished=true" |
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 | |
sudo ufw allow http | |
sudo ufw allow https | |
sudo ufw allow 6443/tcp # apiserver | |
sudo ufw allow 7000/tcp # stats | |
sudo ufw allow 9101/tcp # metrics exporter | |
sudo apt-get -y install haproxy | |
sudo service haproxy restart |
OlderNewer