This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.
- Check which git you're running:
which git
| # vi: ft=dosini | |
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = pavan.sss1991@gmail.com | |
| username = pksunkara | |
| [core] | |
| editor = nvim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| pager = delta | |
| [column] |
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
| cd repository | |
| git checkout --orphan orphan_name | |
| git rm -rf . | |
| rm '.gitignore' | |
| echo "#Title of Readme" > README.md | |
| git add README.md | |
| git commit -a -m "Initial Commit" | |
| git push origin orphan_name |
This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.
which git
| """ | |
| Create a spinning cursor or progress bar in terminal can be useful | |
| for some scripts. | |
| 1. Use '\r' to move cursor back to the line beginning. Or use '\b' | |
| to erase the last character. | |
| 2. The standard out of Python is buffered, which means it will | |
| collect some data written to standard out before it actually | |
| writes to the terminal. | |
| The code snippet |
| #!/bin/sh | |
| set -e | |
| # First we are going to make sure that you understand this is sort of experimental and we will be compiling stuff. | |
| # by default CONTINUE will be false | |
| CONTINUE=false | |
| echo "" | |
| echo "You are about to download, compile, and install stuff on your computer." |
| /* | |
| * Magento 2 mixins for js files that return an object literal | |
| * (based on https://alanstorm.com/the-curious-case-of-magento-2-mixins/) | |
| * (for files that return an UIComponent: https://gist.github.com/alecarg/ed0516132e9c8a31c66f13fbccd292cf) | |
| * (for files that return a function: ) | |
| */ | |
| define([ | |
| 'mage/utils/wrapper' | |
| ], function (wrapper) { |
See also:
vinegar.vim, which makes - open netrw in the directory of the current file, with the cursor on the current file (and pressing - again goes up a directory). Vinegar also hides a bunch of junk that's normally at the top of netrw windows, changes the default order of files, and hides files that match wildignore.
With vinegar, . in netrw opens Vim's command line with the path to the file under the cursor at the end of the command. ! does the same but also prepends ! at the start of the command. y. copies the absolute path of the file under the cursor. ~ goes to your home dir. Ctrl+6 goes back to the file (buffer) that you had open before you opened netrw.
To launch netrw: