Giter Club home page Giter Club logo

dotfiles's Introduction

Ed's Dotfiles

This repository contains some of my personal configuration files that I use to make my work more efficient and personalized. It uses alias and function to perform the required tasks.

Note

Configurations work well with macOS using Zsh customized with Oh My Zsh framework

Features

  • Change directory layer depth by number (1 to 4)
  • Commit changes to local and remote repositories with one command
  • Show the working branch of all target repositories with one command
  • Pull changes on all target repositories with one command
  • Show statuses on all target repositories with one command
  • Highlight cat and kubectl command output
  • Back up data from source to target with one command

Directory structure

📦dotfiles
 ┣ 📂.zsh
 ┃ ┣ 📜aliases.zsh
 ┃ ┗ 📜functions.zsh
 ┣ 📂assets
 ┃ ┗ 📜zshref.png
 ┣ 📜.zshrc
 ┣ 📜LICENSE
 ┗ 📜README.md

Prerequisites

Installation

  1. Add .zsh directory to your home directory.
  2. Reference aliases.zsh and functions.zsh to your .zshrc or .zprofile. Referencing aliases and functions
  3. Restart terminal.

Usage

Change directory

Use ..<1 to 4> to move up the directory hierarchy:

admin@MacBook-Pro ~ % ..2

Git

Use launch "<commit message>" to commit changes directly to local and remote repository:

admin@MacBook-Pro ~ % launch "Some commit message"

Use branch to show the working branch of all local child repositories:

# Go to parent directory
admin@MacBook-Pro ~ % branch

Use tow to pull changes on all local child repositories:

# Go to parent directory
admin@MacBook-Pro ~ % tow

Use status to check the status of all local child repositories:

# Go to parent directory
admin@MacBook-Pro ~ % status

Syntax highlighting for cat command output

Use ccat <filename> to impose syntax highlighting on cat command output:

admin@MacBook-Pro ~ % ccat my-config.yml

Backup command

Caution

This is a one-way (source to target) data backup. Any data that is deleted from source will be deleted on target. dotfiles are ignored.

  1. Open aliases.zsh and look for alias backup=....
  2. Update the source path (/PATH/TO/SOURCE-VOLUME/) to the directory or volume that is to be backed up.
  3. Update the target path (/PATH/TO/TARGET-VOLUME) to the directory or volume where the backup is to be stored
  4. Save the changes and restart the terminal.

Usage

admin@MacBook-Pro ~ % backup

Configure Kubernetes context

  1. Open aliases.zsh and look for alias dev01=....
  2. Specify the path of target kubeconfig file to be used on /path/to/.kube/kubeconf.
  3. Save the changes and restart terminal.

Tip

You can change dev01 to the word or alias you want.

Usage

admin@MacBook-Pro ~ % dev01
admin@MacBook-Pro ~ % ░▒▓  You are now configured to access dev01 environment. 

dotfiles's People

Contributors

edlime 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.