==============================================================
 ╔═╗    ╔╦╗      ╔═╗  ╔╦╗     ╔═╗                   ╔═══════╗
 ║ ║    ╚╩╝  ╔═══╝ ╚══╩╬╝ ╔═══╝ ╚═══╗  ╔════════╗  ╔╝ ╔═══╗ ║
 ║ ╚══════╗  ╚═══╗ ╔═══╝  ║ ╔═════╗ ║  ║ ╔════╗ ║  ║ ╔╝  ╔╝ ║
 ║ ╔══════╝  ╔═╗ ║ ║ ╔═╗  ╚═╝   ╔═╝ ║  ║ ║    ║ ║  ╚═╝  ╔╝ ╔╝
 ║ ╚══════╗  ║ ║ ║ ║ ║ ║     ╔══╝ ╔═╝  ║ ╚════╝ ║     ╔═╝ ╔╝
 ╚════════╝  ╚═╝ ╚═╝ ╚═╝     ╚════╝    ╚════════╝     ╚═══╝
==============================================================


== INDEX ==

## Mac ## * restart menu bar * F8~12 have error (Mission Control) * nfs mount server * multistage ssh * change Google Chrome font * change icons * permit ssh with X window * restart ssh daemon * enable super user * terminal color dark * download Xcode Command Line Tools * private file of Karabiner (KeyRemap4MacBook) * hide Application Dock icon * remove MobileBackups * time sync on Marvericks * change local hostname * input combining charactor * image cropping by terminal * check registered printer IP * right click drag in touch pad * back to page from address bar (Google Chrome) * UNIX_TIME <-> time conversion * install LATEX by Homebrew ## Linux ## * authorized_keys * check the version of RedHat * install sshd by apt get * add sudo user * Lunar Linux virtio setting * set Emacs key bind * hide desktop icons ## Zsh ## * zshall * conditional expressions * Globbing Flags * Glob Qualifiers * Parameter Expansion Flags * error at complementation (Tab key) ## Git ## * add submodule * rm submodule * update submodule * replace submodule * change submodule position * add new repository on GitHub * clone new repository from GitHub * conflict error * do not open editor at merge * install git under home * check tracked files * recover removed file * rebase brew Formula * add new repository to private git server * remove file from all history * download tag from remote repository * change remote repository URL ## Vim ## * install vim with lua under HOME dir (Linux) * install vim with luajit instead of lua (Linux) * install vim with lua by homebrew (Mac) * install vim with luajit instead of lua (Mac) * install vim with python under HOME dir (Linux) * start without X server * modeline ## Tmux ## * install tmux under HOME dir * use clip board (Mac) * press Esc key immediately * show only 1 pane temporary ## Geant4 ## * install geant4 (Mac) * cmake src with ROOT * install VRML (Mac) * cmake error about ROOT * suppress G4ParticleGun messages * set filter for trajectries in macro ## ROOT ## * install ROOT with cocoa * change default setting * install ROOT with cocoa by homebrew * upgrade error on homebrew * change print size * change X range of TGrap * TText TLatex * change TStyle for some part * set file name for output in macro ## Homebrew ## * update error because of git * permission error ## Other ## * set htaccess on HP * rsync error for large size file * Gmail search option * atan2 (C language) * KEKCC batch queue back

## Git ###############################

* add submodule +------------------------------------------+ | $ git submodule add <src_url> <dst_path> | +------------------------------------------+ * rm submodule edit <git_dir>/.gitmodules edit <git_dir>/.git/config +------------------------------------------+ | $ rm <git_dir>/.git/modules/<dst_module> | +------------------------------------------+ * update submodule +-------------------------------------+ | $ git submodule update ^-i (--init)^| +-------------------------------------+ * replace submodule +------------------------------------+ | $ rm -rf <dst_module> | | $ rm -rf .git/modules/<dst_module> | | $ git rm --cached <dst_module> | +------------------------------------+ edit .git/config * change submodule position  edit these files .gitmodules .git/config .git/modules/<dst module>/config <dst module>/.git * add new repository on GitHub create new repository in WEB +--------------------------------------------------------------+ | $ git remote add origin git@github.com:ekawa/<repo_name>.git | | $ git push -u origin master | +--------------------------------------------------------------+ * clone new repository from GitHub +-------------------------------------------------------------+ | $ git clone git@github.com:ekawa/<repo_name>.git <dst_path> | +-------------------------------------------------------------+ * conflict error when  conflict:merge error then +-------------------------------------+ | $ git reset --hard master; git pull | +-------------------------------------+ at /usr/local * do not open editor at merge set environment variable  export GIT_MERGE_AUTOEDIT=no * install git under home +-------------------------------------------------------------+ | $ ./configure --prefix=/home/ekawa/local | | $ PYTHON_PATH=/home/ekawa/local/bin/python3.0@ make | | $ PYTHON_PATH=/home/ekawa/local/bin/python3.0@ make install | +-------------------------------------------------------------+ NOTE : in git 1.8.4 case python3 is necessary * check tracked files +----------------+ | $ git ls-files | +----------------+ * recover removed file +----------------------------------------+ | $ git checkout <hash> -- <file> | | e.g. HEAD\^, ce36818a3a | +----------------------------------------+ * rebase brew Formula +-----------------------------------+ | $ cd /usr/local | | $ git pull --rebase origin master | +-----------------------------------+ * add new repository to private git server make repository dir on git server +------------------------------------------+ | $ mkdir ~/git_repository/<repo name>.git | | $ cd ~/git_repository/<repo name>.git | | $ git --bare init | +------------------------------------------+ remote add on local machine +-----------------------------------------------------------------+ | $ cd <dst repo> | | $ git remote add origin ssh://ekawa@yang.scphys.kyoto-u.ac.jp:\ | | <port>/home/ekawa/git_repository/<repo name>.git | | $ git push -u origin master | +-----------------------------------------------------------------+ if you want to use this repository on anotner machine, use git clone +--------------------------------------------------------+ | $ git clone ssh://ekawa@yang.scphys.kyoto-u.ac.jp:\ | | <ip>/home/ekawa/git_repository/<repo name>.git <dst> | +--------------------------------------------------------+ * remove file from all history +-------------------------------------------------------------------------------------+ | $ git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch <dst>' HEAD | | $ git push -u origin master --force | +-------------------------------------------------------------------------------------+ * download tag from remote repository +-------------------+ | $ git pull --tags | +-------------------+ * change remote repository URL +-------------------------------------+ | $ git remote set-url <branch> <URL> | +-------------------------------------+ % example git remote set-url origin ssh://<usr>@example.jp:22/home/<***.git>