Skip to content

Instantly share code, notes, and snippets.

View Ghost-VR's full-sized avatar
😫

Michael Yang Ghost-VR

😫
  • Apple Inc.
  • Santa Clara, CA
View GitHub Profile
@Ghost-VR
Ghost-VR / windows_command_line.cmd
Last active June 11, 2021 18:54
Windows command line commands
// Grant access to (sub)directories
icacls "J:\WindowsImageBackup" /grant "Users:(OI)(CI)F" /T
// Windows diff
FC <file1> <file2>
FC /B <file1> <file2> // Bitwise compare
@Ghost-VR
Ghost-VR / Makefile
Created April 29, 2020 08:23
A very simple and efficient Makefile for C++, good for course projects!
CXX :=g++
CXXFLAGS :=-Wall
SRCS :=$(wildcard *.cpp)
SRCS :=$(filter-out demo.cpp, $(SRCS))
SRCS_H :=$(patsubst %.cpp, %.h, $(SRCS))
OBJS :=$(patsubst %.cpp, %.o, $(SRCS))
all: build
run: build
@Ghost-VR
Ghost-VR / header.code-snippets
Last active June 5, 2024 00:20 — forked from coffeenotfound/h.code-snippets
Visual Studio Code Snippet: C/C++ Header Guard; Auto Include
{
"Add include guard": {
"prefix": "guard",
"description": "Adds an ifndef include guard to a C/C++ header",
"body": [
"#ifndef __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__",
"#define __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__",
"",
"$0",
"",
@Ghost-VR
Ghost-VR / loopback_exempt.txt
Last active March 8, 2020 21:49
Loopback exempt settings for proxying Windows 10 UMP apps (Use UMP App with Shadowsocks etc..)
> netsh winhttp import proxy source=ie
Go to regedit: HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings
find SID of UMP app
> CheckNetIsolation.exe loopbackexempt -a -p=<SID>
Source:
1. https://community.spiceworks.com/topic/868050-define-ie-proxy-settings-machine-wide
2. https://zhuanlan.zhihu.com/p/29989157
Reset: