[Git] Repository clone

// Git Bash에서 아래 명령어 실행. git clone (URL) (폴더 이름)

[Git] Remote Branch 이름 변경

1. Local에 있는 Branch 이름 변경 git branch -m old_branch new_branch 2. Remote에 존재하는 old_branch 삭제 git push origin :old_branch 3. new_branch 푸시하기 git push origin new_branch

[Git] Push 되돌리기

git reset --hard HEAD~n (n은 되돌릴 작업의 갯수 ex) git reset --hard HEAD~2) git push origin master (암호 입력 요구함)

[Git] file name too long

git config --system core.longpaths true

[NSIS] 인증서 설치

# https://nsis.sourceforge.io/Import_Root_Certificate # 사용 예 # ${AddCertificateToStore} $0 "$VAR_INSTDIR\rootcert.cer" !define CERT_QUERY_OBJECT_FILE 1 !define CERT_QUERY_CONTENT_FLAG_ALL 16382 !define CERT_QUERY_FORMAT_FLAG_ALL 14 !define CERT_STORE_PROV_SYSTEM 10 !define CERT_STORE_OPEN_EXISTING_FLAG 0x4000 !define CERT_SYSTEM_STORE_LOCAL_MACHINE 0x20000 !define CERT_STORE_ADD_ALWAYS 4 !macro _AddCertificateToStore un Function ${un}_AddCertificateToStore Exch $0 Push $1 Push $R0 System::Call "crypt32::CryptQueryObject(i ${CERT_QUERY_OBJECT_FILE}, w r0, \ i ${CERT_QUERY_CONTENT_FLAG_ALL}, i ${CERT_QUERY_FORMAT_FLAG_ALL}, \ i 0, i 0, i 0, i 0, i 0, i 0, *i .r0) i .R0" ${If} $R0 0 System::Call "crypt32::CertOpenStore(i ${CERT_STORE_PROV_SYSTEM}, i 0, i 0, \ i ${CERT_STORE_OPEN_EXISTING_FLAG}|${CERT_SYSTEM_STORE_LOCAL_MACHINE}, \ w 'ROOT') i .r1" ${If} $1 0 System::Call "crypt32::CertAddCe...

[NSIS] 권한 상승

# https://nsis.sourceforge.io/UAC_plug-in !macro _UAC_Elevation un Function ${un}_UAC_Elevation Push $R0 Exch Pop $R0 uac_tryagain: !insertmacro UAC_RunElevated ${Switch} $0 ${Case} 0 ${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done ${IfThen} $3 0 ${|} ${Break} ${|} ;we are admin, let the show go on ${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user MessageBox mb_YesNo|mb_IconExclamation|mb_TopMost|mb_SetForeground "This $R0 requires admin privileges, try again" /SD IDNO IDYES uac_tryagain IDNO 0 ${EndIf} ;fall-through and die ${Case} 1223 MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "This $R0 requires admin privileges, aborting!" Quit ${Case} 1062 MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Logon service not running, aborting!" Quit ${Default} MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to...

[NSIS] 특수 경로 얻어오기

# 설치 경로에 '$'가 포함된 특수 경로이면 해당 경로를 찾아서 SetOutPath 설정, '$'가 포함되어 있지 않으면 들어온 경로 그대로 설정. # 호출 예 # ${GetSpecialPathReplaced} '반환' '특수 경로가 포함된 경로' # ${GetSpecialPathReplaced} $0 "$DESKTOP\test" # $0 == '$DESKTOP 부분이 로컬 PC의 환경에 맞춰 경로를 얻어오고 나머지 뒷 부분은 그대로.' !define CSIDL_DESKTOP '0x0' # Desktop path ($DESKTOP) !define CSIDL_PROGRAMS '0x2' # Programs path !define CSIDL_PERSONAL '0x5' # My document path !define CSIDL_FAVORITES '0x6' # Favorites path ($FAVORITES) !define CSIDL_STARTUP '0x7' # Startup path !define CSIDL_RECENT '0x8' # Recent documents path ($RECENT) !define CSIDL_SENDTO '0x9' # Sendto documents path ($SENDTO) !define CSIDL_STARTMENU '0xB' # StartMenu path !define CSIDL_MUSIC '0xD' # My Music path ($MUSIC) !define CSIDL_DESKTOPDIR '0x10' # Desktop Directory path !define CSIDL_COMPUTER '0x11' # My Compute...

[C] Command Prompt(명령 프롬프트) 창 띄우지 않고 명령어 실행

#include <iostream> #include <Windows.h> namespace EXEC_COMMAND { namespace RETURN { namespace FAILURE { const int CREATE_PIPE = 1; const int CREATE_PROCESS = 2; } } } int ExecCommand(std::string command, std::string& output); int main() { std::string output; ExecCommand("ping -n 1 142.251.42.164", output); std::cout

개조식

글을 쓸 때 짧게 끊어서 중요한 요점이나 단어를 나열하는 방식을 말한다. (반말처럼...) 아래 "문장1"을 서술식 기술, "문장2"를 개조식이라고 한다. 문장1 프레젠테이션의 스킬을 향상시켜주는 제안에 대한 기술서입니다. 중견 간부의 프레젠테이션에 대한 능력을 향상시켜 업무의 생산성을 높이는 것을 목적으로 합니다. 문장2 프레젠테이션 스킬 향상 과정 안내서 목적 : 중견 간부의 프레젠테이션 능력 배양, 업무 생산성 제고

블로그 편집 시 자주 사용하는 html 태그 모음

출력 문자 HTML 코드 < &lt; > &gt; (Tab) <span style="white-space: pre;"> </span>

[C++] string 자료형 대문자, 소문자 변환

https://github.com/MoongStory/StringTool tolower, toupper 기능 참고.

Integrity Level SID 값

const char * const INTEGRITY_LEVEL_SID_UNTRUSTED = "S-1-16-0"; const char * const INTEGRITY_LEVEL_SID_BELOW_LOW = "S-1-16-2048"; const char * const INTEGRITY_LEVEL_SID_LOW = "S-1-16-4096"; const char * const INTEGRITY_LEVEL_SID_MEDIUM_LOW = "S-1-16-6144"; const char * const INTEGRITY_LEVEL_SID_MEDIUM = "S-1-16-8192"; const char * const INTEGRITY_LEVEL_SID_HIGH = "S-1-16-12288"; const char * const INTEGRITY_LEVEL_SID_SYSTEM = "S-1-16-16384";

[C++] 다양한 형식 간 변환 (형변환)

char *에서 변환 wchar_t에서 변환 * _bstr_t에서 변환 CComBSTR에서 변환 CString에서 변환 basic_string에서 변환 Convert System:: String https://docs.microsoft.com/ko-kr/cpp/text/how-to-convert-between-various-string-types?view=msvc-160 int to string #include <iostream> #include <sstream> int main() { int int_value = 3; std::ostringstream int_to_string; int_to_string string to int, double #include <iostream> #include <sstream> int main() { int int_value = 0; std::stringstream int_string_stream("123"); int_string_stream >> int_value; double double_value = 0.0; std::stringstream double_string_stream("12.3456"); double_string_stream >> double_value; if (!int_string_stream.fail()) { std::cout

컴퓨터 예약 종료

명령 프롬프트 또는 실행 창에 입력. shutdown -s -t 60 이렇게 입력해 주면 된다. 위 명령어에서 60은 초단위 시간이다 60초는 1분이기 때문에 위 스샷대로 입력하면 1분 후에 종료가 되고 만약 1시간 뒤에 종료하고 싶다면 shutdown -s -t 3600 이렇게 입력해 주면 된다. 예약 종료 취소는 shutdown -a shutdown /? 를 입력하면 도움말을 볼 수 있다.

Windows 쓸만한 실행 창 및 명령 프롬프트(CMD) 명령어 및 단축키

콘솔 명령어 control 제어판 appwiz.cpl 프로그램 추가/제거 desk.cpl 디스플레이 등록정보 control Admintools 관리도구 control Userpasswords 사용자 계정 gpedit.msc 로컬 그룹 정책 편집기 관리콘솔 명령어 devmgmt.msc : 장치관리자 shutdown -i : GUI화면으로 시스템 종료, 재부팅 가능 shutdown -s : 시스템 종료 shutdown -r : 시스템 리부팅 shutdown -a : 종료 설정 중지 기타 실행 명령어 netstat : 인터넷 접속 상황 ipconfig /all : ip주소,게이트웨이,서브넷마스크, DNS서버주소,physical주소 dxdiag : 다이렉트X 진단도구 및 그래픽과 사운드의 세부정보를 보여줌 regedit : 레지스트리 편집기 calc : 계산기 charmap : 문자표 pbrush , mspaint : 그림판 control : 제어판 osk : 화상키보드 msconfig : 시스템 구성요소 유틸리티 msinfo32 : 시스템정보 mstsc : 원격 데스크톱 연결 notepad : 메모장 ping -t 사이트주소 : 핑테스트 해당 사이트의 인터넷연결 유무 확인 winver : 윈도우 버전확인 컴퓨터 단축키 모음 Alt+Enter (선택한 항목의 등록 정보 보기 or 선택한 개체의 등록 정보 표시) Alt+Esc (연 순서대로 항목을 순환) F4 키 (내 컴퓨터나 Windows 탐색기에서 주소 표시줄 목록 표시) Windows 로고+Break (시스템 등록 정보 대화 상자 표시) Windows 로고+M (모든 창을 최소화) Windows 로고+Shift+M (최소화된 창을 원래 크기로 복원) Windows 로그+E (내 컴퓨터 열기) Windows 로고+R (실행 대화 상자) Windows 로고+숫자키 (작업표시줄에 등록된 순서대로 실행) Window...