sudo apt update sudo apt -y install curl apt-transport-https curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt update sudo apt -y install vim git curl wget kubelet kubeadm kubectl sudo apt-mark hold kubelet kubeadm kubectl sudo sed -i '/ swap / s/^(.*)$/#\1/g' /etc/fstab sudo swapoff -a sudo modprobe overlay
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
Timezone setting is now handled by Setup-alpine#setup-timezone | |
Note: Only for NON uclibc installs!!! | |
glibc based installs use different timezone setup. | |
apk add tzdata | |
ls /usr/share/zoneinfo | |
Suppose you want to use Brussels First copy the proper zone to localtime | |
cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime |
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
Start with | |
select DISTINCT CITY from STATION where CITY rlike '^[a,e,i,o,u]'; | |
End with | |
select DISTINCT CITY from STATION where CITY rlike '[a,e,i,o,u]$'; | |
Both Start and end | |
select DISTINCT CITY from STATION where CITY rlike '^[a,e,i,o,u].*[a,e,i,o,u]$'; | |
SELECT DISTINCT CITY from STATION where CITY REGEXP '^[^aeiou].*[^aeiou]$'; |
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
version: "3" | |
services: | |
jenkins: | |
build: . | |
user: root | |
volumes: | |
- /jenkins/data:/var/jenkins_home | |
- /jenkins/artifacts:/var/jenkins_artifacts | |
- /var/run/docker.sock:/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
# This configuration file is provided on an "as is" basis, | |
# with no warranties or representations, and any use of it | |
# is at the user's own risk. | |
# | |
# You will need to edit domain name information, IP addresses for | |
# redirection (at the bottom), SSL certificate and key paths, and | |
# the "Public-Key-Pins" header. Search for any instance of "TODO". | |
user www-data; | |
worker_processes 4; |
Create new ssh key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
~/.ssh/config
# Personal GitHub account
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
# input a pcap file from standard input | |
INPUT_PCAP_FILE=$1 | |
HEADER=y | |
SEPARATOR=, | |
QUOTE=d | |
# display standard output | |
tshark \ | |
-r ${INPUT_PCAP_FILE} \ |
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
pandoc -o output.md --extract-media=./ inputfile.docx |
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
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch filePath" --prune-empty --tag-name-filter cat -- --all |
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
#Trim spaces | |
ali.rename(columns=lambda x: x.strip(), inplace=True) | |
#Fill merged cells with upper head | |
ali = mini.fillna(method='ffill', axis=0) | |
#Replace nan with zero | |
support['xx'] = support['xx'].replace(np.nan, 0) |