Skip to content

Instantly share code, notes, and snippets.

clear
git add *
git add README.md
git reset HEAD tên_file
git commit -m "Update ..."
git push origin maste
git push -f origin master
@git-thinh
git-thinh / Cygwin
Last active January 27, 2018 02:46
alias cls='clear'
alias c='cd /cygdrive/c'
alias home='cd ~'
alias code='cd /cygdrive/c/code'
alias min='clear && PATH=$PATH:/cygdrive/c/min/bin && gcc -v && echo'
1. UPDATE CYGWIN
First of all you will need to ensure that Cygwin has the necessary binaries required for apt-cyg. This is achieved via the use of the Cygwin setup executable via the Windows command prompt.
C:\Windows\System32>C:\Users\admin\Downloads\setup.exe -q -P wget,tar,qawk,bzip2,subversion,vim
$ PATH=$PATH:/c/cygwin/bin
$ mkdir .build && cd .build
$ git clone --recursive https://github.com/google/protobuf.git
$ git submodule update --init
$ PATH=$PATH:/c/msys2/mingw64/bin
$ PATH=$PATH:/c/msys2/mingw64/bin
#-----------------------------
#edit file /../home/../.bashrc
alias c='cd /cygdrive/c'
alias home='cd ~'
alias code='cd /cygdrive/c/code'
alias addr2line='/bin/x86_64-w64-mingw32-addr2line.exe'
alias ar='/bin/x86_64-w64-mingw32-ar.exe'
# install toolchain
#$ sudo apt-get install gcc-4.9-locales mingw32 mingw-w64 mingw-w64-tools \
# binutils-mingw-w64 binutils-mingw-w64-x86-64 binutils-mingw-w64-i686 \
# mingw-w64-x86-64-dev mingw-w64-i686-dev
# install autotools
#$ sudo apt-get install autoconf automake autotools-dev
# make sure environment variables are set
@git-thinh
git-thinh / Ubuntu
Last active January 28, 2018 11:06
WSL:
# apt install build-essential autoconf libtool cmake make tar unzip shtool automake patch curl wget golang perl git pkg-config
apt-get install gcc-mingw-w64
Ubuntu
# apt install build-essential autoconf libtool cmake make tar unzip libgflags-dev libgtest-dev clang libc++-dev shtool automake patch curl wget golang perl yasm git pkg-config
git clone --recursive https://github.com/grpc/grpc.git
@git-thinh
git-thinh / MSYS
Last active January 29, 2018 07:58
pacman -Syuu
pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain \
cmake make curl tar unzip git subversion mercurial \
mingw-w64-i686-cmake mingw-w64-x86_64-cmake
pacman -Ss boost
pacman -Sy mingw-w64-i686-boost mingw-w64-x86_64-boost
pacman -Sy mingw-w64-i686-protobuf mingw-w64-x86_64-protobuf
pacman -Sy mingw-w64-i686-grpc mingw-w64-x86_64-grpc
Portable Node.js and NPM on Windows
1. Download the node.exe stand-alone from nodejs.org
https://nodejs.org/download/release/latest/win-x64/
https://nodejs.org/download/release/latest/
2. Grab an NPM release zip off of github
https://github.com/npm/npm/releases
3. Create a folder named: node_modules in the same folder as node.exe
4. Extract the NPM zip into the node_modules folder
5. Rename the extracted npm folder to npm and remove any versioning ie: npm-3.3.4 –> npm.
@git-thinh
git-thinh / IIS_Verbs.config
Created May 16, 2024 09:15 — forked from jalalhejazi/IIS_Verbs.config
CORS: Web.config to enable CORS
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*"/>
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS"/>
<add name="Access-Control-Allow-Headers" value="Content-Type"/>
</customHeaders>
</httpProtocol>