⏰ 這份文件是給還沒有任何帳號、沒裝過任何軟體的參加者看的。 建議在活動前一天花 15–20 分鐘照著做完,現場就能直接開始動手實作。
如果你已經有 GitHub 帳號、VS Code、Git,只要跳到最後的 ✅ 完成檢查清單 確認一下就好。
I ran into a problem with python where a file I wanted to read in and parse contained unexpected non-UTF-8 encoded characters. I am certain there are many ways to solve this problem, but capturing my quick and dirty appraoch below for posterity.
- Open the file and the Open Find
- In find, copy/paste the regex below:
^([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|[\xEE-\xEF][\x80-\xBF]{2}|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})*$- VS Code will highlight the lines MATCHING UTF encoded characters. So, you just have to skim the file looking for lines without highlighting.
WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.
- Windows Subsystem for Android or WSA must be Installed.
Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.
- First install Windows Subsystem for Android. [Click here](https://gist.github.com/HimDek/eb8704e2da1d98240153165743
You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my Pluralsight account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool
The flags you have to supply may vary depending on which site you make a request to.
You can get a free 3 month trial to Pluralsight by signing up for free to Visual Studio Dev Essentials
Well, not so much a quirk - but an interesting anti-pattern I found in some (poor quality) PowerShell. Documenting the "how and why" so I can refer to it again if needed!
We have two files callme.ps1 and functions.ps1:
functions.ps1:
Source: https://montemagno.com/how-to-convert-a-pcl-library-to-net-standard-and-keep-git-history/
- Unload your PCL project (right click -> unload), and start editing it (right -> click edit)
- Delete Everything in the csproj and insert this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
| rem see https://github.com/coreybutler/nvm-windows/issues/300 | |
| @echo off | |
| SETLOCAL EnableDelayedExpansion | |
| if [%1] == [] ( | |
| echo Pass in the version you would like to install, or "latest" to install the latest npm version. | |
| ) else ( | |
| set wanted_version=%1 |