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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
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
------------------------------------------------------------ | |
Wordpress | |
------------------------------------------------------------ | |
Créer un [Shortcode] pour lister les articles en brouillon | |
------------------------------------------------------------ | |
<?php | |
function shortcode_brouillons($param) { |
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
#!/usr/bin/python2 | |
from selenium import webdriver | |
chrome_options = webdriver.ChromeOptions() | |
chrome_options.add_argument('--headless') | |
chrome_options.add_argument('--no-sandbox') | |
driver = webdriver.Chrome('chromedriver', chrome_options=chrome_options, service_args=['--verbose', '--log-path=/tmp/chromedriver.log']) | |
driver.get('https://python.org') |
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
# Centos 7 | |
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum-config-manager --enable epel | |
yum install -y vim wget unzip git python34 python34-pip # python34-devel | |
mkdir /opt/chromedriver | |
wget https://chromedriver.storage.googleapis.com/2.42/chromedriver_linux64.zip | |
unzip chromedriver_linux64.zip -d /opt/chromedriver | |
rm -f chromedriver_linux64.zip | |
mv /opt/chromedriver/chromedriver /opt/chromedriver/chromedriver-2.42 |
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
#!/usr/bin/python3 | |
import re | |
from selenium import webdriver | |
list_stores = [ | |
"https://www.auchandrive.fr/drive/mag/update-924", | |
] | |
list_products = [ | |
"https://www.auchandrive.fr/catalog/coca-cola-zero-1l-P762493", |
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
# My dependencies | |
yum install -y telnet mlocate | |
# Prepare system | |
setenforce 0 | |
swapoff `cat /etc/fstab | grep swap | awk '{print $1}'` | |
cat <<EOF > /etc/sysctl.d/k8s.conf | |
net.bridge.bridge-nf-call-ip6tables = 1 | |
net.bridge.bridge-nf-call-iptables = 1 | |
EOF |
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
# Uninstall everything | |
docker stop $(docker ps -aq) | |
docker rm $(docker ps -aq) | |
yum remove -y kubeadm kubelet kubectl | |
yum remove -y docker-ce docker | |
rm -rf /etc/kubernetes/ /var/lib/kubelet/ /etc/systemd/system/kubelet.service.d /etc/systemd/system/multi-user.target.wants/kubelet.service /var/lib/kubelet/ /var/log/containers /var/log/pods /usr/bin/kubelet /usr/libexec/kubernetes /etc/systemd/system/kubelet.service /etc/yum.repos.d/kubernetes.repo | |
rm -rf /var/lib/docker |
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
# Install Kubernetes Cluster | |
# Targets: Master + Workers | |
# Prepare system | |
# Disable SELinuw | |
setenforce 0 | |
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config | |
# Disable Swap |
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
# Request your access_token (expires every 10-15 minutes) | |
curl -X POST -s "https://auth.tado.com/oauth/token" -d client_id=tado-web-app -d grant_type=password -d client_secret=xxxxxxxxx -d '[email protected]' -d 'password=myPassword' -d scope=home.user | |
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1YzIyOTliNmQ2MDE4MDAwMDg4ZGJhNGEiLCJ0YWRvX2hvbWVzIjpbeyJpZCI6MjgzNzg3fV0sImlzcyI6InRhZG8iLCJsb2NhbGUiOiJmciIsImF1ZCI6InBhcnRuZXIiLCJuYmYiOjE1NDU4NjI4NTQsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJnZXJtYWluLmxlZmVidnJlNEBnbWFpbC5jb20iLCJuYW1lIjoiR2VybWFpbiBMZWZlYnZyZSIsImV4cCI6MTU0NTg2MzQ1NCwiaWF0IjoxNTQ1ODYyODU0LCJ0YWRvX2NsaWVudF9pZCI6InRhZG8td2ViLWFwcCIsImp0aSI6IjEzYzdlOTA4LTQzOWEtNDA5OC04OWMyLTZmNWFlYjhlODM5NyIsImVtYWlsIjoiZ2VybWFpbi5sZWZlYnZyZTRAZ21haWwuY29tIn0.Otrk9iAM3AM3suRTGgYh9FcTL1onsD3wEbHAHhBv1RD9mTnFv_Uds-NOXtZJpWApq_R0i5d-Lfy64UCdN3EW5DEb8QaCyvwmjOpgFEU1WvRNamh_dZGzB_AwCkI10qVe5qSpKL-_I51zxUsLmhOubfUJZE9wjBNVDMXVyq8vX-rzFIrJH3dfdgTalYyUYlrU3oBs2Q5eSCzR8dh09fBfIC_vy |
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
#!/usr/bin/env python | |
# Author: Germain LEFEBVRE [Ineat] | |
# Prerequisites | |
# 00 - Create API Access Key in AWS Accounts to monitor | |
# 00 - Fill ~/.aws/credentials with API Access Keys | |
# 01 - Fill ./config.yml 'aws_account' dict with aws profiles or access/secret key as following: | |
# aws_accounts: | |
# - name: Ineat iLab | |
# profile: INEAT_ILAB |
OlderNewer