Giter Site home page Giter Site logo

bearbobs / mac-dotfiles Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 252 KB

Base macos setup dotfiles with terminal, vim and tmux config. Tested on m1, m1 pro and m2

Ruby 2.80% Shell 58.49% Python 31.11% Vim Snippet 0.09% Vim Script 7.50%
brew dotbot dotfiles dotfiles-macos iterm2 tmux vim

mac-dotfiles's Introduction

dotfiles

Missing feature? ๐Ÿด Fork this repo and make it better!

Installation

Tell Git who you are using these commands:

git config -f ~/.gitlocal user.email "[email protected]"
git config -f ~/.gitlocal user.name "Name Lastname"

Under the hood

Note: You may put your custom settings into ~/.zshlocal.

Projects tree

I suggest you to organize project folder as follows:

~/Projects
โ”œโ”€โ”€ Forks       # for GitHub fork
โ”œโ”€โ”€ Job         # for job projects
โ”œโ”€โ”€ Playground  # for short-term experiments
โ””โ”€โ”€ Repos       # for long-term projects

Aliases

Aliases are gonna make your work fast and enjoyable. See code in $DOTFILES/lib/aliases.zsh. Here is what's included:

  • Aliases from Oh-My-Zsh. See Oh-My-Zsh Cheatsheet for more.
  • Easier navigation
    • .. โ†’ cd ..
    • ... โ†’ cd ../..
    • .... โ†’ cd ../../..
    • ..... โ†’ cd ../../../..
    • ~ โ†’ cd ~
    • - โ†’ cd -
  • Folders shortcuts
    • dl โ†’ cd ~/Downloads
    • dt โ†’ cd ~/Desktop
    • pj โ†’ cd ~/Projects
    • pjr โ†’ cd ~/Projects/_Repos
    • pjf โ†’ cd ~/Projects/_Forks
    • pl โ†’ cd ~/Projects/_Playground/
  • Commands Shortcuts
    • e โ†’ $EDITOR
    • +x โ†’ chmod +x
    • x+ โ†’ chmod +x
    • ll โ†’ ls -alF
    • la โ†’ ls -A
    • l โ†’ ls -CF
  • Open
    • open <FILE> โ€” open file from terminal.
    • o <FILE> โ€” open file from terminal.
    • oo โ€” open current folder.
  • Misc
    • update โ€” get updates (Runs $DOTFILES/scripts/update.zsh).
    • dotfiles โ€” jump quickly into dotfiles folder.
    • myip โ€” my local IP address.
    • password โ€” generate random password, copies it into clipboard and outputs it to terminal.
    • path โ€” print $PATH in readable view.
    • getpage โ€” download web page with all assets.
    • get โ€” download file with original filename.

Bin

Dotfiles also include some functions that will make your life easier. See code in bin/.

  • emptytrash โ€” empty the Trash on all mounted volumes and the main HDD.
  • git-cleanup โ€” removes old Git branches and does other cleanup.
  • git-fork โ€” add remote upsteam.
  • git-upstream โ€” sync branch with upstream.
  • gz โ€” get gzipped file size
  • n โ€” runs given command using binary in node_modules/.bin of the current project.
  • nyan โ€” print nyan cat.
  • server โ€” start an HTTP server from a directory.

Git

Note: Add your git user data and custom settings to ~/.gitlocal.

Git Aliases

  • git a โ†’ git add โ€” patch mode for specified files.
  • git ua โ†’ git reset HEAD โ€” unstage files.
  • git b โ†’ git branch โ€” list, create, or delete branches.
  • git c โ†’ git commit โ€” record changes to the repository.
  • git co โ†’ git checkout โ€” checkout a branch or paths to the working tree.
  • git ap โ†’ git add -p โ€” add file contents to the index.
  • git ca โ†’ git commit -a โ€” commit with automatically stage files that have been modified and deleted.
  • git cm โ†’ git commit -m โ€” commit with commit message.
  • git cam โ†’ git commit -am โ€” add all files and commit with message.
  • git s โ†’ git status -sb โ€” short status with current branch.
  • git master โ€” go to master branch and pull from remote.
  • git develop โ€” go to develop branch and pull from remote.
  • git git โ€” do not complain about git git.
  • git l โ€” commits log with pretty single line format.
  • git ll โ€” log with list of changed files for each commit.
  • git ignore โ€” ignore files: append file to .gitignore.
  • git this โ€” initialize, add all files and commit.
  • git amend โ€” amend last commit.
  • git redo โ€” amend last commit with its original message.
  • git undo โ†’ reset --mixed HEAD^ โ€” reset index changes, but not the working tree.
  • git discard โ†’ checkout -- โ€” discard changes.
  • git contrib โ€” list of contributors and how many commits each person has.
  • git today โ€” see how many lines of code you have written today.
  • git stat โ€” how many lines of code in repo.
  • git sync โ€” pull and push changes from/to remote.
  • git-root โ€” go to repo root.
  • git-cleanup [--force] โ€” removes old Git branches.
  • git-fork <original-author> โ€” add remote upstream.
  • git-upstream [branch] โ€” sync branch with upstream (as default master).

mac-dotfiles's People

Contributors

bearbobs avatar

Stargazers

DJ Spry avatar Nemanja Glumac avatar  avatar Shabbir Hasan avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.