Skip to content

Commit

Permalink
Refactor scripts
Browse files Browse the repository at this point in the history
Removed redundant license headers and updated the README.
  • Loading branch information
yasinmiran committed Oct 20, 2021
1 parent 9e482f6 commit 528148a
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 390 deletions.
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,62 @@
# Yasin's .dotfiles
# Yasin's `.dotfiles`

These are my `dotfiles`!. You should definitely go through the files and tweak them to your needs if want to do so.
Below is a comprehensive explanation on how do I structure these dotfiles.
These are my `dotfiles`!. You should first go through the files and tweak them to your needs if want to do so. Below is
a small explanation on how do I structure these dotfiles.

But before that I must say **thanks** to [eieioxyz](https://github.com/eieioxyz). His
amazing [course](https://www.udemy.com/course/dotfiles-from-start-to-finish-ish/) on Udemy about dotfiles helped me to
understand some important topics in terminals. I highly encourage you to enroll in that course and learn more about
dotfiles in-depth!

## Terminology

Lot of the dotfiles repo's out there has a linear file structure. In this repo I categorized based on modules. So, for
each utility that has possible dotfiles will have their own module. For example, `git`, `vim`, `brew` etc. If you see
one of the below named files in any of the available modules, this is what it means.

### File `defaults`
1. `defaults`

Purpose to hold all the default commands, functions, aliases and related configurations which are loaded to the shell
Basically holds all the default commands, functions, aliases and related configurations which are loaded to the shell
environment.

### File `setup_*`
2. `setup_*`

Purpose to hold all the bootstrapping logic for a new machine. Usually, this will be executed in the `shell` when we
run `./install` file.

## How to `install`?
## `install`?

First navigate to home `cd` and clone the repository using `git clone https://github.com/yasinmiran/.dotfiles.git` and
navigate to dotfiles director using `cd ~/.dotfiles`. Now execute the command below to get started!

#### Hol up 🚧🔧

Before that I usually, manually configure `git` and `ssh` access on a new machine. If you're running macOS Big Sur you
may have to grant your Terminal app `Full Disk Access` in order to smoothly execute `install` script.

```bash
$ ./install
```

After executing above command, dotfiles are linked successfully. To pickup the changes you must quit the current
terminal process and all the functions will be preloaded to your zsh environment. Now you can re-run the installation
command like below.
After executing above command, dotfiles will get linked and all the sub `setup_*` scripts will execute in order. To pick
up the changes you must quit the current terminal process and all the functions will be preloaded to your zsh
environment. Now you can re-run the installation command like below.

## Kudos 🧙🏻‍♂️
## Many Kudos 🧙🏻‍♂️

My dotfiles are **inspired by** some amazing dotfiles projects out there. Also, checkout
this [curated list](https://github.com/webpro/awesome-dotfiles) for more amazing stuff!

- [eieioxyz](https://github.com/eieioxyz/dotfiles_macos)
- [Anish's dotfiles](https://github.com/anishathalye/dotfiles)
- [Mathias's dotfiles](https://github.com/mathiasbynens/dotfiles)
- [Bo's dotfiles](https://github.com/janusboandersen/dotfiles)
- [Raf's dotfiles](https://github.com/rafaeleyng/dotfiles)
- [Ryan's dotfiles](https://github.com/ryanb/dotfiles)
- [Holman's dotfiles](https://github.com/holman/dotfiles)

## TODO
## Things I'm currently working on

- [ ] Map IDE configurations (vscode, IdeaU, Goland).
- [ ] Mapping IDE configurations (vscode, Idea).
- [ ] Map Vim configurations.
- [ ] Revisit SSH configurations.
- [ ] Implement a new strategy for secret managing.
4 changes: 4 additions & 0 deletions brew/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ cask "microsoft-word"
cask "postman"
# Team communication and collaboration software
cask "slack"
# Music streaming service
cask "spotify"
# Open-source code editor
cask "visual-studio-code"
# JavaScript IDE
cask "webstorm"
mas "Bitwarden", id: 1352778147
mas "Gifski", id: 1351639930
22 changes: 0 additions & 22 deletions brew/defaults
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
#!/usr/bin/env zsh

# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# ======================================================================================
# Functions
# ======================================================================================
Expand Down
27 changes: 3 additions & 24 deletions brew/setup_brew
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
#!/usr/bin/env zsh

# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# This file contains the bootstrap logic for homebrew. This shouldn't be called
# everytime (although its fine). These commands, rather setup.zsh file intended
# everytime (although its fine). These commands, in this file intended
# to call from dotbot shell configuration when configuring a new machine.

#
# First source the brew related default configurations to the shell environment.
# We can ensure that zshrc variables are in the env because we source it after
# linking. See dotbot config for `source zsh/zshrc` shell command.

source "$DOTFILES_DIR/brew/defaults"

# Install homebrew via curl. If brew is already installed then just update
Expand Down
30 changes: 0 additions & 30 deletions docker/defaults
Original file line number Diff line number Diff line change
@@ -1,39 +1,9 @@
#!/usr/bin/env zsh

# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# ======================================================================================
# Exports
# ======================================================================================

# ======================================================================================
# Aliases
# ======================================================================================

alias dlistall="docker ps -a"
alias dstart="docker start"
alias dstop="docker stop"

# ======================================================================================
# Functions
# ======================================================================================
22 changes: 0 additions & 22 deletions git/defaults
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
#!/usr/bin/env zsh

# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# ======================================================================================
# Aliases
# ======================================================================================
Expand Down
23 changes: 1 addition & 22 deletions git/gitconfig
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# This is the user-specific configuration file.
# Also called "global" configuration file.
#
# Read the docs: https://git-scm.com/docs/git-config

[user]
Expand Down
22 changes: 0 additions & 22 deletions git/setup_git
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
#!/usr/bin/env zsh

# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Generate SSH key in default location (~/.ssh/config)
ssh-keygen -t ed25519 -C "[email protected]"

Expand Down
23 changes: 0 additions & 23 deletions install.conf.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# @author: Yasin
# @description: dotbot configuration file.
#
# The configuration file is typically written in YAML,
Expand Down
22 changes: 1 addition & 21 deletions macos/defaults
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
#!/usr/bin/env zsh

# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Work in progress
22 changes: 0 additions & 22 deletions maven/defaults
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
#!/usr/bin/env zsh

# MIT License
#
# Copyright (c) 2021 Yasin Miran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

alias mvnci="mvn clean install"
Loading

0 comments on commit 528148a

Please sign in to comment.