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
k8s-host: | |
vars: | |
definition: "definition from k8s-host" | |
hosts: | |
k8s-deployment-host: | |
vars: | |
definition: "definition from k8s-deployment-host" | |
k8s-deployment-host: | |
vars: |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
namespace: default | |
name: "dev-simple-web-app-web-app" | |
spec: | |
strategy: | |
type: Recreate | |
replicas: 1 | |
minReadySeconds: 0 |
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
# resolving problems with RBAC on minikube https://kubernetes.io/docs/admin/authorization/rbac/ | |
minikube delete | |
minikube start | |
# check containers status | |
kubectl get pods --all-namespaces | |
# wait until all containers will be initialized | |
kubectl -n kube-system create sa tiller |
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
#Replace nginx default.conf file | |
RUN rm -f /etc/nginx/conf.d/default.conf | |
COPY default.conf /etc/nginx/conf.d/ |
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
# Expose internally the Docker Socket and run forever | |
socat "TCP-LISTEN:2375,reuseaddr,fork" "UNIX-CLIENT:/var/run/docker.sock" |
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
#!/bin/bash | |
# Build a commit frequency list. | |
ROW_LIMIT=20 | |
git log --name-status $* | \ | |
grep -E '^[A-Z]\s+' | \ | |
cut -c3-500 | \ | |
sort | \ | |
uniq -c | \ |
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
mb_internal_encoding('utf-8'); | |
$s = mb_substr($s, 0, 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
use mysql; | |
SELECT | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `size_MB` | |
FROM information_schema.TABLES | |
WHERE table_schema = "backend" | |
order by size_MB desc; |
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 foreign keys checking by call this query : "set foreign_key_checks=0;" | |
Enable back foreign key checking with : "set foreign_key_checks=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
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 --slave /usr/bin/g++ g++ /usr/bin/g++-5 |