Last active
September 18, 2023 12:18
-
-
Save mniak/31cea1e0e50809dbb4e5dd13d689644c to your computer and use it in GitHub Desktop.
My OS #config files
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
# FOR MACOSX: curl -o ~/.bash_profile https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.bash_profile -H 'Cache-Control: no-cache' | |
# FOR LINUX: curl -o ~/.bashrc https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.bash_profile -H 'Cache-Control: no-cache' | |
export PS1="\[\e[33m\]\W\[\e[m\] \\$\[$(tput sgr0)\] " | |
export CLICOLOR=1 | |
export TERM=xterm-256color | |
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | |
if [ $(uname) == "Darwin" ]; then #OSX specific configuration | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export PATH="/usr/local/bin:$PATH" | |
alias mvim="/Applications/MacVim.app/Contents/bin/mvim" | |
alias python2='\python' | |
alias python3='python3' | |
fi | |
# Additional Variables | |
export MNIAKSERVER=104.236.111.85 | |
export PATH=$PATH:~/.bin |
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
" curl -o ~/.vimrc https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.vimrc -H 'Cache-Control: no-cache' && rm -rf ~/.vim/bundle/Vundle.vim && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim && vim +PluginInstall +qall | |
syntax on | |
set nocompatible | |
filetype off | |
set backspace=eol,start,indent | |
set rtp+=~/.vim | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'scrooloose/nerdcommenter' | |
"Plugin 'itchyny/lightline.vim' | |
Plugin 'bling/vim-bufferline' | |
"Plugin 'Valloric/YouCompleteMe' | |
Plugin 'c.vim' | |
call vundle#end() | |
filetype plugin indent on | |
set expandtab | |
set tabstop=4 | |
set shiftwidth=4 | |
set number | |
let g:python_recommended_style = 0 | |
if has("gui_running") | |
if has("gui_gtk2") | |
set guifont=Inconsolata\ 12 | |
elseif has("gui_macvim") | |
set guifont=Menlo\ Regular:h14 | |
elseif has("gui_win32") | |
set guifont=Fira_Code:h11 | |
set renderoptions=type:directx | |
set encoding=utf-8 | |
endif | |
set guioptions-=T | |
endif | |
" vim-airline | |
let g:airline_powerline_fonts = 1 | |
"let g:airline#extensions#tabline#enabled = 1 | |
"set guitablabel=%t | |
" NERD Commenter | |
let mapleader = ";" | |
"set laststatus=2 | |
"set showtabline=2 | |
"set guioptions-=e | |
" Key bindings | |
nnoremap <F9> :!%:p<enter> |
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
" FOR LINUX/UNIX: mkdir -p ~/.config/nvim && curl -o ~/.config/nvim/init.vim https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/init.vim -H Cache-Control:no-cache | |
" FOR WINDOWS: mkdir %localappdata%\nvim && curl -o %localappdata%\nvim\init.vim https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/init.vim -H Cache-Control:no-cache | |
call plug#begin() | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
call plug#end() |
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
#!/bin/bash | |
# curl -s https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/macos_bootstrap.sh -H 'Cache-Control: no-cache' | bash | |
# HOMEBREW CONFIGURATION | |
if ! brew help > /dev/null; then | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
brew update | |
brew install python python3 | |
brew install mosh | |
brew install wget jq | |
# DOWNLOAD MY CONFIG FILES | |
curl -o ~/.bash_profile https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.bash_profile -H 'Cache-Control: no-cache' | |
curl -o ~/.vimrc https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.vimrc -H 'Cache-Control: no-cache' && rm -rf ~/.vim/bundle/Vundle.vim && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim && vim +PluginInstall +qall | |
# DEVELOPMENT ENVIRONMENT | |
# brew install llvm cmake | |
## >> GIT CONFIGURATION | |
git config --global user.name "Andre Soares" | |
git config --global user.email [email protected] | |
## << END GIT CONFIGURATION | |
if ! ls ~/Library/KeyBindings 2> /dev/null > /dev/null; then | |
mkdir -p ~/Library/KeyBindings | |
curl -o ~/Library/KeyBindings/DefaultKeyBinding.dict https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/~_Library_KeyBindings_DefaultKeyBinding.dict | |
fi | |
# Configure terminal color theme | |
wget -O xt http://git.io/v3Dll && chmod +x xt && ./xt && rm xt | |
# CREATE SYMLINKS | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport | |
# END | |
echo -------------------- | |
echo BOOTSTRAP COMPLETED! | |
echo -------------------- |
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
#!/bin/bash | |
# curl -s https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/ubuntu_bootstrap.sh -H 'Cache-Control: no-cache' | bash | |
sudo apt install wget curl | |
# DOWNLOAD MY CONFIG FILES | |
curl -o ~/.bashrc https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.bash_profile -H 'Cache-Control: no-cache' | |
curl -o ~/.vimrc https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.vimrc -H 'Cache-Control: no-cache' && rm -rf ~/.vim/bundle/Vundle.vim && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim && vim +PluginInstall +qall | |
## >> GIT CONFIGURATION | |
git config --global user.name "Andre Soares" | |
git config --global user.email [email protected] | |
git config --global credential.helper store | |
git config --global merge.tool kdiff3 | |
## << END GIT CONFIGURATION | |
# Configure color theme | |
curl -o xt https://raw.githubusercontent.com/Mayccoll/Gogh/master/themes/aco.sh && chmod +x xt && ./xt && rm xt |
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-ExecutionPolicy RemoteSigned -scope CurrentUser | |
iex (new-object net.webclient).downloadstring('https://get.scoop.sh') | |
# INSTALL PACKAGE MANAGER | |
scoop update | |
scoop bucket add versions | |
scoop bucket add extras | |
scoop install python python27 | |
scoop install curl wget jq | |
scoop install nuget | |
# SETUP DEVELOPMENT ENVIRONMENT | |
scoop install kdiff3 | |
## << CONFIGURE GIT | |
scoop install git | |
git config --global user.name "Andre Soares" | |
git config --global user.email "[email protected]" | |
git config --global --unset-all merge.tool | |
git config --global --unset-all mergetool.path | |
git config --global --unset-all mergetool.trustExitCode | |
git config --global --add merge.tool kdiff3 | |
git config --global --add mergetool.path C:\Users\andre.guilherme\scoop\shims\kdiff3.exe | |
git config --global --add mergetool.trustExitCode false | |
git config --global mergetool.keepBackup false | |
### GIT GLOBAL IGNORE FILE | |
git config --global core.excludesfile ~/.gitignore_global | |
echo ### MNIAK'S GLOBAL GITIGNORES FOR WINDOWS ### > %userprofile%\.gitignore_global | |
echo. >> %userprofile%\.gitignore_global | |
echo # --- Windows.gitignore --- >> %userprofile%\.gitignore_global | |
curl -o - https://raw.githubusercontent.com/github/gitignore/master/Global/Windows.gitignore >> %userprofile%\.gitignore_global | |
echo # --- Backup.gitignore --- >> %userprofile%\.gitignore_global | |
curl -o - https://raw.githubusercontent.com/github/gitignore/master/Global/Backup.gitignore >> %userprofile%\.gitignore_global | |
## >> END GIT CONFIGURATION | |
## << CONFIGURE VIM | |
scoop install vim | |
curl -o %userprofile%\.vimrc https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.vimrc -H 'Cache-Control: no-cache' | |
rmdir /s/q %userprofile%\.vim\bundle\Vundle.vim | |
git clone https://github.com/VundleVim/Vundle.vim.git %userprofile%\.vim\bundle\Vundle.vim | |
## >> | |
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
{ | |
/* | |
* Remap Home /End keys | |
* Source: https://www.maketecheasier.com/fix-home-end-button-for-external-keyboard-mac/ | |
*/ | |
/* Home */ | |
"\UF729" = "moveToBeginningOfLine:"; | |
/* End */ | |
"\UF72B" = "moveToEndOfLine:"; | |
/* Shift + Home */ | |
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; | |
/* Shift + End */ | |
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; | |
/* Ctrl + Home */ | |
"^\UF729" = "moveToBeginningOfDocument:"; | |
/* Ctrl + End */ | |
"^\UF72B" = "moveToEndOfDocument:"; | |
/* Shift + Ctrl + Home */ | |
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; | |
/* Shift + Ctrl + End */ | |
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment