TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #411 · 9 фев.

reload_flag="" if [[ -n "${DEBUG}" ]]; then reload_flag="--reload" fi if [[ -n "${WORKER_COUNT}" ]]; then workers=${WORKER_COUNT} else workers=2 fi gunicorn --workers ${workers} \ --bind 0.0.0.0:8000 \ ${reload_flag} main.wsgi Писали такие конструкции чтобы проверить наличие флага и сформировать команду правильно? На самом деле можно сделать тоже самое проще. Для этого используются операторы условной подстановки, доступные в оболочках семейства POSIX. :- для установки значений по умолчанию ${WORKER_COUNT:-2} Если переменная не объявлена, то будет дефолтное значение 2. :+ подставляет указанный текст, если переменная не пуста ${DEBUG:+--reload} Если что-то есть в переменной то распечатается текст после символа +, в противном случае - ничего. Удобно для опциональных флагов, как в нашем примере. Итого наш скрипт может выглядеть так: gunicorn --workers ${WORKER_COUNT:-2} \ --bind 0.0.0.0:8000 \ ${DEBUG:+--reload} main.wsgi Есть еще два оператора. := не только подставить дефолтное значение, но и присвоить его переменной, если она пуста # никаких переменных еще нет VAL1=${VAL2:=hello} # теперь доступны обе echo $VAL1 $VAL2 # hello hello :? остановить выполнение с ошибкой, если переменной нет. echo ${MISS:?is required} bash: MISS: is required Код выхода будет 1. #tricks#linux

Резултати

Пронајдени 17 слични објави

Пребарај: #bootloader

当前筛选 #bootloader清除筛选
XP Digital Lab

@rocchl · Post #7761 · 09.12.2025 г., 02:04

全球/中国手机品牌 Bootloader 解锁耻辱榜 一个开源项目 Bootloader Unlock Wall of Shame,记录各大手机品牌是否允许用户解锁 Bootloader。用户认为解锁是自由,厂商则强调数据安全,因此这一问题长期存在争议。 GitHub地址 标签:#github#bootloader Created by RocM 官方频道:@rocCHL 官方群组:@roctech 官方合作:@rocmmbot

木制杂物间

@trashbox_404 · Post #29 · 14.04.2025 г., 11:07

你米是有一套操作的,非要搞这样。 确实是因为有一部分人开挂什么的影响环境......真的要考虑OP嘛 还是看摄像吧,可以的就熟悉一下... #小米#Bootloader

Libreware

@libreware · Post #1479 · 03.09.2025 г., 22:47

#bootloader unlock wall of shame https://github.com/melontini/bootloader-unlock-wall-of-shame updated guide, check it before buying a #phone Over the past few years, a suspicious number of companies have started to "take care of your data", aka block/strictly limit your ability to unlock the bootloader on your own devices. While this may not affect you directly, it sets a bad precedent. You never know what will get the axe next: Shizuku? ADB? Sideloading? I thought it might be a good idea to keep track of bad companies and workarounds. #android

Libreware

@libreware · Post #1170 · 01.09.2023 г., 02:27

#Xiaomi#Bootloader#Unlock without PC (Phone-To-Phone) Note: We are not responsible for any data loss or corrupt devices. Proceed at your own risk. This procedure requires the use of 2 Android phones and an OTG cable for ADB debugging. If this is your first time unlocking the bootloader or your device is using a new MIUI account, proceed with Step 2 after 7 days Step 1 [Configuring Settings] [Primary Phone]: » Go to Settings > About Phone: Click on MIUI Version multiple times until developer options are enabled » Go to Settings Homepage > Additional Settings > Developer Options: Enable OEM Unlocking and USB Debugging » Then go to Mi Unlock Status: Click on Add account and device Step 2 [Installing Flash scripts] [Secondary Phone]: » Download and install these 3 APKs on your secondary phone: https://github.com/RohitVerma882/termux-miunlock/ (outdated?) https://github.com/termux/termux-app/releases/ https://github.com/termux/termux-api/releases/ » Connect the primary phone to the secondary phone via OTG » Boot the primary phone into fastboot mode » Open the Termux app: Follow and run these commands one by one according to the instructions 👤Credits Techbuzznet (Video instructions for Indians) RohitVerma888 @WildWaze ( thx for help and banner) https://t.me/popMODS/3621

Libreware

@libreware · Post #1334 · 25.09.2024 г., 15:38

#Unlock#bootloader#xiaomi#Android HyperSploit Bypass HyperOS restrictions on bootloader unlocking https://github.com/TheAirBlow/HyperSploit/ https://xdaforums.com/t/hypersploit-bypass-hyperos-bootloader-unlocking-restrictions.4668775/ MiUnlockTool Retrieve encryptData (token) for Xiaomi devices to unlock bootloader, it is compatible with all platforms. https://github.com/offici5l/MiUnlockTool termux-miunlock A program that can be used to retrieve the bootloader unlock token for Xiaomi devices (and unlock the bootloader) using Termux https://github.com/RohitVerma882/termux-miunlock/

耕读频道

@iGengdu · Post #542 · 13.09.2024 г., 11:40

#小米#Bootloader#解锁#考题 分享:小米 BootLoader《解锁资格答题测试》模拟考及题库 该项目提供小米历次BootLoader《解锁资格答题测试》真题题库和模拟考测试,帮助大量考生快速提高答题成绩。 今年最后一场小米BootLoader《解锁资格答题测试》将于9 月 24 日上午 8:00 - 8:15举行。 希望大家认真备考,让自己的小米设备早日上岸! 题库及模拟考 https://xmbl.neko.ink/ GitHub https://github.com/MlgmXyysd/Xiaomi-BootLoader-Questionnaire/ 参考:蓝星天宇大佬。 📢频道✈️ 群聊 (耕读) 📬投稿

12
ПретходнаСтраница 1 од 2Следна