Git reflog (history of all operations)
git reflog
Git reset (can be --soft, --mixed (default) or --hard)
git reset
Git reflog (history of all operations)
git reflog
Git reset (can be --soft, --mixed (default) or --hard)
git reset
| import os | |
| from pathlib import Path | |
| import sys | |
| p = Path(os.getcwd()) | |
| index = p.parts.index('YOUR_ROOT_FOLDER') | |
| posix_path = Path().joinpath(*p.parts[:index + 1]) | |
| sys.path.insert(1, str(posix_path)) |
Python 3.6
| import argparse | |
| import xml.etree.ElementTree as ET | |
| from zipfile import ZipFile | |
| def docx_to_str(filepath): | |
| """ Load a docx file and return its content """ | |
| DOC_XML = 'word/document.xml' | |
| TEXT_TAG = '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}t' |
Diff with vim
git difftool --tool=vimdiff
| #!/bin/bash | |
| for i in {0..8} | |
| do | |
| for j in {1..4} | |
| do | |
| newvalue=$(($i + (9 * $j))) | |
| cp "def$i" "def$newvalue" | |
| done | |
| done |
| #!/bin/bash | |
| # Setup install for MacOS | |
| list=(reattach-to-user-namespace vim tmux wakeonlan wget z gnu-sed) | |
| cask_list=(iterm2 dashlane docker sublime-text emacs anaconda google-chrome \ | |
| evernote slack telegram vlc) | |
| # Install Homebrew if not already installed | |
| which -s brew | |
| if [[ $? != 0 ]] ; then |