-
Check EditorConfig
-
Go to
Settings/Preferences | Editor | Code Style
and disableDetect and use existing file indents for editing
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
# reference https://support.microsoft.com/zh-cn/help/929833/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system | |
## for win10 | |
DISM.exe /Online /Cleanup-image /Restorehealth | |
sfc /scannow |
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
# cache 凭证并设置有效期为一小时 | |
git config --global credential.helper cache | |
git config --global credential.helper --timeout 3600 | |
# 存储凭证 | |
git config --global credential.helper store | |
# 存储凭证并自定义保存位置 | |
git config --global credential.helper store --file /mnt/thumbdrive/.git-credentials |
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
# 1. 针对 https (替换为 git 协议为 https 协议) | |
## set | |
git config --global http.proxy 'socks5://127.0.0.1:1080' | |
## unset | |
git config --global --unset http.proxy | |
# 2. 针对 git | |
## set in windows | |
### vim ~/.ssh/config | |
Host github.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
# list avds | |
emulator -list-avds | |
# start avd | |
emulator @<avd-name> |
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
# list available packages | |
sdkmanager --list | |
# install packages | |
sdkmanager <packages> | |
# uninstall packages | |
sdkmanager --uninstall <packages> | |
# update packages | |
sdkmanager --update |
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
using UnityEngine; | |
using System.Collections.Generic; | |
public class ExampleScript : MonoBehaviour { | |
public Rigidbody projectile; | |
void Start() { | |
InvokeRepeating(nameof(LaunchProjectile), 2.0f, 0.3f); | |
} | |
void LaunchProjectile() { |
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
uiElement.GetComponent<RectTransform>.sizeDelta = new Vector2 (width, height); |
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
using System; | |
using System.Timers; | |
public class Example { | |
private static Timer aTimer; | |
public static void Main() { | |
// Create a timer and set a two second interval. | |
aTimer = new System.Timers.Timer(); | |
aTimer.Interval = 2000; | |
// Hook up the Elapsed event for the timer. |