- Don't criticize, condemn, or complain.
- Give honest and sincere appreciation.
- Arouse in the other person an eager want.
- Never show others that you are not interested in what they have to say.
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
git clone https://github.com/CrazyOptimist/jenkins.git your_dir_name | |
cd your_dir_name | |
cp .env.example .env | |
docker-compose up -d |
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
const fs = require('fs'); | |
(() => { | |
return new Promise(async (resolve, reject) => { | |
try { | |
let file = fs.readFileSync(`${__dirname}/app.js`) | |
resolve(file) | |
} catch (err) { | |
reject(`Oops! \n ${err}`) | |
} |
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
if [ -z "$(docker images | awk '/^<none>/ {print $3}')" ]; then | |
echo "You don't have any <none> tagged images." | |
else | |
docker rmi $(docker images | awk '/^<none>/ {print $3}') | |
fi |
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
/* | |
Serve is a very simple static file server in go | |
Usage: | |
-p="8100": port to serve on | |
-d=".": the directory of static files to host | |
Navigating to http://localhost:8100 will display the index.html or directory | |
listing file. | |
*/ | |
package main |
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 <<EOF | sudo tee /etc/modules-load.d/containerd.conf | |
overlay | |
br_netfilter | |
EOF | |
sudo modprobe overlay | |
sudo modprobe br_netfilter | |
# Setup required sysctl params, these persist across reboots. | |
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf |
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
sudo apt-get update | |
sudo apt-get install -y apt-transport-https ca-certificates curl | |
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg | |
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
sudo apt-get update | |
sudo apt-get install -y kubelet kubeadm kubectl | |
sudo apt-mark hold kubelet kubeadm kubectl |
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
export function debounce<T extends unknown[], U>( | |
callback: (...args: T) => U, | |
wait: number, | |
): (...args: T) => void { | |
let timer: NodeJS.Timeout | undefined = undefined | |
return (...args: T): void => { | |
if (timer) { | |
clearTimeout(timer) | |
} |
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 | |
curl -s https://api.github.com/repos/sharkdp/bat/releases/latest \ | |
| grep -v ".sha256" \ | |
| grep browser_download_url | |
curl -SL https://github.com/sharkdp/bat/releases/download/v0.22.1/bat_0.22.1_amd64.deb -o bat.deb | |
sudo dpkg -i bat.deb | |
rm bat.deb |
OlderNewer