This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir repo_cleanup | |
$ cd repo_cleanup | |
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY . | |
$ git filter-branch --force --index-filter \ | |
"git rm --cached --ignore-unmatch key.txt" \ | |
--prune-empty --tag-name-filter cat -- --all | |
$ echo "key.txt" >> .gitignore | |
$ git add .gitignore | |
$ git commit -m "Add key.txt to .gitignore" | |
$ git push origin --force --all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazynvm() { | |
unset -f nvm node npm | |
export NVM_DIR=~/.nvm | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
} | |
nvm() { | |
lazynvm | |
nvm $@ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./configure \--with-features=huge \ | |
--enable-multibyte \ | |
--enable-rubyinterp=dynamic \ | |
--enable-pythoninterp=dynamic \ | |
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ \ | |
--with-python-command=/usr/bin/python \ | |
--enable-python3interp=dynamic \ | |
--with-python-config-dir=/usr/lib/python3.9/config-3.9-x86_64-linux-gnu/ \ | |
--with-python3-command=/usr/bin/python3 \ | |
--enable-perlinterp=dynamic \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Using a shell function in your .bashrc (recommended approach): | |
```bash | |
findgrep() { | |
find . -type f -exec grep -l "$1" {} \; | |
} | |
``` | |
*** Or even simpler, you can use grep -r directly (more efficient): | |
```bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " Disable vi compatibility | |
filetype plugin indent on " Enable filetype detection | |
syntax on " Enable syntax highlighting | |
set mouse=r " Enable mouse copy-paste, navigation | |
set clipboard=unamedplus " Enable clipboard | |
" Colorscheme and appearance | |
colorscheme desert " Clean, attractive colorscheme | |
set background=dark " Dark background for better contrast | |
set number " Show line numbers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gi() { | |
local query="$@" | |
local url="https://www.toptal.com/developers/gitignore/api/$query" | |
local result | |
# Fetch the .gitignore template | |
result=$(curl -sL "$url" 2>&1) | |
if [[ $? -ne 0 ]]; then | |
echo "Error: Failed to fetch data from $url (network or curl issue)." | |
return 1 |
OlderNewer