跳到主要內容

發表文章

[Git] 解決無法上傳至Github問題(Windows)

 方法一: 因為Github政策改變,導致利用https url方式傳輸需要PAT (Personal Access Token),不然就要用SSH方式,這裡紀錄修改使用PAT方式。 連結 1. 建立PAT      * Setting -> Developer Setting -> Personal Access Token     * Generate new token     * 勾選 repo                     admin:repo-hook                     delete_repo 2. 修改自己的密碼為PAT     * 清除已儲存密碼           git config --unset user.password     * 重新pull           git pull     * 跳出OpenSSH 視窗,並輸入帳號及密碼(PAT) 方法二: git clone https://oauth-key-goes-here@github.com/username/repo.git 參考連結

[工具] 將程式碼嵌入網頁的幾種方法

方法一 、.Net Fiddle + iFrame 1. 進入 dotnetfiddle.net      2.  點選上方Share按鈕 3. 複製iFrame連結 4. 結果:      5. 優缺點: 優點 可於網頁執行程式碼 適合完整可執行程式碼  缺點 肥大且不適合片段程式碼  方法二、Github Gist  1. 進入 Github gist 2. 輸入程式碼及檔名。gist是透過副檔名辨識該程式語言,因此必須輸入才會有syntax highlight 3.結果: 4.優缺點: 優點: 簡單,適合用於片段程式碼 缺點: 需上傳程式碼 方法三、Code Prettify 1. 於html 引入 prettify套件,加入這行: < script src =" https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js " > </ script > 2.<pre class="prettyprint">加入程式碼</pre> 3.結果: using System; public class Program { public static void Main() { Console.WriteLine("Hello World"); } } 4.優缺點: 優點 方便易用 可透過引用參數改變皮膚,例如: <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js ?skin=desert "></script> 彈性大,可自訂css 製作獨一無二的syntax highlight 缺點 對於不會html、css的人可能較難上手 方法四、其他產生Syntax highlight網站 1. 例如   hilite.me 2. 複製產生之html並貼上即可 3. 結果 1 2 3 4 5 6 7 8 9 using System ; public

遊戲 : 閃躲三寶

遊玩目標: 閃躲馬路上三寶,看看你能開多遠吧 控制: 左右滑動 平台: Android 檔案位置: Google Drive Devlog: 2021/1/31 新增除錯模式 新增FCM功能 新增Firestore功能 新增RemoteConfig功能 2021/1/30  新增 Firebase套件 新增版號 修正距離重算 減少檔案大小 移除點擊控制

Unity 路徑變數

Application.dataPath 指向遊戲檔案路徑 會依據平台不同 Unity Editor:  < path to project folder >/Assets Mac player :   < path to player app bundle >/Contents iOS player:   < path to player app bundle >/< AppName.app >/Data (this folder is read only, use  Application.persistentDataPath  to save data). Win/Linux player :   < path to executablename_Data folder > (note that most Linux installations will be case-sensitive!) WebGL:  The absolute url to the player data file folder (without the actual data file name) Android:  Normally it points directly to the APK . If you are running a split binary build, it points to the OBB instead. Windows Store Apps:  The absolute path to the player data folder (this folder is read only, use  Application.persistentDataPath to save data) Application.consoleLogPath 指向Editor.log路徑 Application.persistentDataPath 指向持久性資料夾,該資料夾可供存放遊戲持久性資料。當程式更新時,資料夾內檔案不會刪除,但使用者可手動刪除。 會依據平台不同 Windows Store Apps :   %userprofile%\AppData\Local\Packages\<product