+--------------------+
| Control Plane |
| (Master Node) |
+--------------------+
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
const port = 3000; | |
const ws = require("ws"); | |
const server = require("http").createServer(); | |
const connection = []; | |
const wss = new ws.WebSocketServer({ server }); | |
server.listen(port, () => { | |
console.log(`Server started on port ${server.address().port}`); | |
}); |
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
[ | |
{ | |
"id": "5a6ce86e2af929789500e7e4", | |
"author": "Edsger W. Dijkstra", | |
"en": "Computer Science is no more about computers than astronomy is about telescopes." | |
}, | |
{ | |
"id": "5a6ce86e2af929789500e7d7", | |
"author": "Edsger W. Dijkstra", | |
"en": "Simplicity is prerequisite for reliability." |
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 | |
# Function to add or update an alias in .bashrc | |
add_alias_to_bashrc() { | |
local alias_name="$1" | |
local alias_command="$2" | |
# Check if the alias already exists in .bashrc | |
if grep -q "^alias $alias_name=" ~/.bashrc; then | |
# Update the existing alias |
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
eval "$(starship init zsh)" | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will |
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 apt-get update -y | |
sudo apt-get install ca-certificates curl gnupg lsb-release -y | |
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
sudo echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt-get update -y | |
sudo apt-get install \ | |
ca-certificates \ | |
curl \ |
NewerOlder