docker build -f Dockerfile-native-image -t native-builder .
docker create --name temp-native native-builder
docker cp temp-native:/app/target/native-demo ./target/native-demo
docker rm temp-native
docker build -f Dockerfile-bookworm -t bookworm-runtime .
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
| $TEN_CUA_BAN = "tbvinh" | |
| $XXXX = "xxx" #-- người cần xóa | |
| # Lấy danh sách tên tất cả repo | |
| $repos = gh repo list $TEN_CUA_BAN --limit 1000 --json name --jq '.[].name' | |
| foreach ($repo in $repos) { | |
| # Kiểm tra xem user có trong repo này không |
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
| $TEN_CUA_BAN = "tbvinh" | |
| $all_users = @() | |
| # 1. Lấy danh sách tất cả các repo | |
| $repos = gh repo list $TEN_CUA_BAN --limit 1000 --json name --jq '.[].name' | |
| Write-Host "Đang quét tất cả repositories, vui lòng đợi..." -ForegroundColor Cyan | |
| # 2. Duyệt qua từng repo để lấy danh sách user | |
| foreach ($repo in $repos) { |
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 | |
| # --- Cấu hình dự án --- | |
| PROJECT_DIR="mva_terraform_project" | |
| echo "Bắt đầu tạo cấu trúc dự án Terraform tại thư mục: $PROJECT_DIR" | |
| # 1. Tạo thư mục gốc | |
| mkdir -p $PROJECT_DIR | |
| cd $PROJECT_DIR |
https://github.com/connectbot/connectbot
docker-compose up --build
docker exec -it connectbot-apk-builder bash
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
| import requests | |
| def get_ngrok_url(): | |
| try: | |
| response = requests.get('http://localhost:4040/api/tunnels') | |
| tunnels = response.json()['tunnels'] | |
| if tunnels: | |
| return tunnels[0]['public_url'] | |
| else: | |
| return None |
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
| #/etc/apache2/sites-enabled/000-default.conf | |
| sudo a2enmod proxy | |
| sudo a2enmod proxy_http | |
| sudo a2enmod headers | |
| sudo systemctl restart apache2 | |
| <VirtualHost *:80> | |
| #ServerName www.example.com |
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
| #/etc/systemd/system/ngrok.service | |
| [Unit] | |
| Description=Ngrok Tunnel | |
| After=network.target | |
| [Service] | |
| User=vinh | |
| ExecStart=/usr/local/bin/ngrok http 80 |
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
| #/etc/systemd/system/gunicorn.service | |
| [Unit] | |
| Description=Gunicorn instance to serve myapp | |
| After=network.target | |
| [Service] | |
| User=vinh | |
| Group=www-data | |
| WorkingDirectory=/home/vinh |
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
| import tensorflow as tf | |
| import tensorflow_hub as hub | |
| # Check if the Universal Sentence Encoder can be loaded from the provided link | |
| model_url = "https://tfhub.dev/google/universal-sentence-encoder/4" | |
| try: | |
| model = hub.load(model_url) | |
| # model.save('universal-sentence-encoder.model') | |
| tf.saved_model.save(model, 'universal-sentence-encoder.model') |
NewerOlder