sudo !!
<Ctrl+r>
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) | |
} |
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 |
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 |
/* | |
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 |
I hereby claim:
To claim this, I am signing this object:
name: redis | |
services: | |
redis: | |
image: redis:7 | |
container_name: redis | |
command: "redis-server --loglevel warning" | |
volumes: | |
- redis_data:/data/ | |
ports: |
#!/bin/bash | |
# Check the latest version of NVM | |
curl https://github.com/nvm-sh/nvm/releases/latest | cut -d \/ -f 8 | cut -d \" -f 1 | |
# Run the install script | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash | |
# Paste in this scripts into your .bashrc or .bash_profile | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" | |
# Install node and npm |
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}`) | |
} |