- 社群:源來適你
- 活動:《JetBrains IDE 微醺夜 - IDE 操作技巧分享》
- 日期:22th April 20:00
- 地點:線上 Google Meet (無錄影)
- 活動貼文: https://www.facebook.com/share/14vC5d14hDD/?mibextid=wwXIfr
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
| Write-Information "This script needs be run on Windows Server 2019 or 2022" | |
| If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" } | |
| # Define environment variables | |
| $downloadDir = "C:\WinGet" | |
| $gitRepo = "microsoft/winget-cli" | |
| $msiFilenamePattern = "*.msixbundle" | |
| $licenseFilenamePattern = "*.xml" | |
| $releasesUri = "https://api.github.com/repos/$gitRepo/releases/latest" |
ITHOME 鐵人賽 :: 主題競賽組觀戰區
目前這份資料是用年久失修的爬蟲在跑的,新版網址如下:
https://ithome-2021-ironman.s3.ap-northeast-1.amazonaws.com/index.html
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
| ''' | |
| https://note.nkmk.me/en/python-function-return-multiple-values/ | |
| 我們用 function 可以一次回傳多個值, 當成了解 list 與 tuple 不同的地方 | |
| ''' | |
| # list 數學叫 "陣列", 其特性是 一堆有 “順序” 關係的東西清單. | |
| # 這些東西, 未必要同一型態, 但同一型態 的 list 比較合理(且常用) | |
| ''' |
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
| <?php | |
| // copied from python code at https://stackoverflow.com/a/23221582/3103058 | |
| function base32_decode($key) { | |
| // https://www.php.net/manual/en/function.base-convert.php#122221 | |
| $key = strtoupper($key); | |
| list($t, $b, $r) = array("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", "", ""); | |
| foreach(str_split($key) as $c) | |
| $b = $b . sprintf("%05b", strpos($t, $c)); | |
| foreach(str_split($b, 8) as $c) | |
| $r = $r . chr(bindec($c)); |
We did it! We broke gist.github.com ;) So head over to the new home! Thank you all!
2021.10.20: https://github.com/AveYo/MediaCreationTool.bat now open for interaction
Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
A powerful yet simple windows 10 / 11 deployment automation tool as well!
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/sh /etc/rc.common | |
| START=99 | |
| USE_PROCD=1 | |
| start_service() { | |
| if [ -e /root/.upgrade ] | |
| then exit | |
| else touch /root/.upgrade | |
| fi |
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
| # Download the VDI from https://cdn.amazonlinux.com/os-images/latest/ | |
| # Doc is at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html | |
| # Be sure you have config/meta-data and config/user-data ready as per the below | |
| # change ec2-user's password to your password | |
| $ cat config/meta-data | |
| local-hostname: amazonlinux.onprem | |
| # eth0 is the default network interface enabled in the image. You can configure |
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/ash | |
| echo "Updating package list..." | |
| opkg update > /dev/null | |
| if [ `opkg list-upgradable | cut -d " " -f1 | wc -l` -gt 0 ]; then | |
| echo "Available updates:" | |
| opkg list-upgradable | |
| echo "" |
NewerOlder
