sh install-docker.sh
- log out
- log back in
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 | |
# Ask for YouTube URL | |
read -p "Enter YouTube video URL: " YT_URL | |
# Get the video title from yt-dlp | |
echo "Fetching video title..." | |
TITLE=$(yt-dlp --get-title "$YT_URL") | |
# Replace spaces with underscores for a safe base name |
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 | |
# Set swap file size (4GB) | |
SWAPFILE="/swapfile" | |
SIZE="4G" | |
echo "Creating a $SIZE swap file at $SWAPFILE..." | |
# Create the swap file | |
sudo fallocate -l $SIZE $SWAPFILE || sudo dd if=/dev/zero of=$SWAPFILE bs=1G count=4 |
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 -e | |
# Current Directory | |
CURRENT_DIR=$(pwd) | |
# Header Function | |
function printhead() { | |
clear |
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
# take the backup | |
iptables-save > iptables-backup.text | |
# open UDP port | |
iptables -I INPUT -p udp --dport 5443 -j ACCEPT | |
# save changes | |
iptables-save | |
# check the changes | |
sudo iptables -L -v -n | more | |
# if want open all udp ports | |
iptables -I INPUT -p udp -j ACCEPT |
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.9' | |
services: | |
mongodb: | |
# image : mongo:4.4.13 | |
image: mongo:5.0 | |
container_name: mongodb | |
ports: | |
- 27017:27017 |
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
# mongod.conf | |
# remote access + Authetication enable | |
# location: /etc/mongod.conf | |
# for documentation of all options, see: | |
# http://docs.mongodb.org/manual/reference/configuration-options/ | |
# Where and how to store data. | |
storage: | |
dbPath: /var/lib/mongodb | |
journal: |
This is a sample script for executing a function with the minutes timer in the specific times using Google Apps Script. For example, when this sample script is used, the following situation can be achieved.
- Execute a function every 10 minutes only in 09:00 - 12:00 and 15:00 - 18:00 for the weekday.
When the above situation is shown as an image, it becomes as follows.
NewerOlder