Giter Site home page Giter Site logo

sleipnir-scripts's Introduction

Sleipnir-scripts

Useful bash scripts for personal use

Good to know

You don't have to be a black belt in Shell Fu to use these scripts, nevertheless, a certain insight of the command line might come in handy. Especially when adding these scripts to your path and/or making aliases to execute them.

Installing

You can pull these scripts to wherever you like. Some scripts (for instance for loading aliases) require this directory's path to be stored as a variable $SCRIPTDIR in your zshrc or bashrc for easy access. To use the scripts from any location, simply add this freshly created directory's path to your $PATH.

export SCRIPTDIR=$HOME/where/you/put/the/scripts
export PATH=$SCRIPTDIR:$PATH

Scripts

onboot

When triggered shows a message and prompts the user to update. I use Pantheon Terminal, so I trigger this one on system boot with

pantheon-terminal -e "/bin/zsh -c 'onboot'"

gitservice

Useful for working with your own repositories in a project.

Take an action and a parameter

  • status: show the status of every repository
  • changes: show the status of repositories that have uncommitted changes
  • pull: pulls every repository

Take additional parameters

  • log-on: shows the commit history of every repository in a directory on a certain day takes an author and an optional date [YYYY-MM-DD] if the date is left blank the current date is used
  • log-since: shows the commit history of every repository since a certain day takes an author and an optional date [YYYY-MM-DD] if the date is left blank, the date of the most recent monday is used

Alias examples:

alias gsAlfa="gitservice status /home/dries/Drive/Development/web/repos/AlfaPackages"
alias gcAlfa="gitservice changes /home/dries/Drive/Development/web/repos/AlfaPackages"
alias gpAlfa="gitservice pull /home/dries/Drive/Development/web/repos/AlfaPackages"
alias gloBeta="gitservice log-on /home/dries/Drive/Development/web/Beta Dries"
alias glsBeta="gitservice log-since /home/dries/Drive/Development/web/Beta Dries [2017-09-19]"

aliases

Aliases that are stored in src/cnf_aliases are automatically sources into bash/zsh. When using a lot of aliases they can become hard to remember. This function displays the aliases by given category.

aliases cat //gives all alias categories
aliases web //gives the aliases under the web category

Other directories

src

Contains resources I use in most of my scripts and the function to load these resources.

txt

Contains text files used by some of the scripts (not necessarily scripts included in this repository).

sleipnir-scripts's People

Contributors

cqr-dries avatar drieshooghe 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.