Skip to content

Instantly share code, notes, and snippets.

View lexnewgate's full-sized avatar
💭
I may be slow to respond.

lexnewgate lexnewgate

💭
I may be slow to respond.
  • Blackjack
  • Shanghai
View GitHub Profile
@lexnewgate
lexnewgate / git
Created January 30, 2023 07:05 — forked from jasonboukheir/git
git when in unix, git.exe when in wsl
#!/bin/sh
if pwd | grep /mnt/c > /dev/null; then
exec git.exe "$@"
else
exec /usr/bin/git "$@"
fi
@lexnewgate
lexnewgate / msys2_config.md
Last active December 31, 2021 02:36
msys2 config
  1. First you select development build for Android.(Build Settings-> Android -> check Develop Build box)

  2. Here is the guide from Unity doc: https://docs.unity3d.com/Manual/ProfilerWindow.html

  3. Before the 'adb forward' you should check the port(34999) first using: netstat -a -o -n | find "34999"

  4. Kill the process that alreay take the port "34999" using: taskkill /F /PID process_id

  5. adb forward --remove-all

git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@lexnewgate
lexnewgate / README.md
Created February 20, 2019 04:53 — forked from chuyik/README.md
macOS 给 Git(Github) 设置代理(HTTP/SSH)
@lexnewgate
lexnewgate / .gitignore
Created December 21, 2018 07:56
UnityIgnore
**/.vs
**/Library
**/obj
**/bin
@lexnewgate
lexnewgate / ProcessHelper.cs
Created December 7, 2018 07:50
UnityProcessHelper
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Debug = UnityEngine.Debug;
namespace Locality
{
class ProcessHelper
{
public static int RunWinCmd(string cmd)
@lexnewgate
lexnewgate / helper.lua
Created July 22, 2018 20:38
helper functions of lua
--helper funcs
function desc(descp,sep,charn)
sep=sep or "-"
charn= charn or 80
charn= (charn>=#descp) and 80 or #descp
leftseps= math.floor((charn-#descp)/2)
rightseps= charn-leftseps-#descp
writeNChar(leftseps,sep)