Friday, September 29, 2017

Useful Bash scripts/tools

Sometimes, we may get new environment to work with, and we may feel some lack of tools, or we would like to make some installations faster than we usually do. That's tools like Docker, Vagrant so developed.

I work in command line on my work laptop in Git Bash for Windows or on servers. From time to time, I make some scripts to optimize some actions.

Bash scrips

Install PS1 colorization for Bash (Windows/Unix)

Sources: https://gist.github.com/andkirby/389f18642fc08d1b0711d17978445f2b
Installation:
$ curl -Ls bit.ly/bash-ps1 | bash
$ . ~/.bashrc

.bashrc file initial content

Sources: https://gist.github.com/andkirby/0e2982bee321aa611bc66385dee5f399
Installation:
$  curl -Ls https://bit.ly/bash-init | bash
$ . ~/.bashrc

Install PHP binaries on Windows in Bash

Sources: https://gist.github.com/andkirby/67e87e319c376b8676d559edb759e3fe
Installation:
$ curl -Ls bit.ly/php-bash-win | bash

Install NodeJs and npm binaries in Bash for Windows

Sources: https://gist.github.com/andkirby/3f65c5a6499739c842e25fb7f6d5e682
Installation:
$ curl -Ls https://gist.github.com/andkirby/3f65c5a6499739c842e25fb7f6d5e682/raw/node-npm-git-bash-win.sh | bash

Slack Message Sender

Sources: https://gist.github.com/andkirby/67a774513215d7ba06384186dd441d9e
Installation:
$ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
$ chmod +x /usr/bin/slack

Install colors for nano editor

Sources: https://gist.github.com/andkirby/65607ce983c3a732ff94cc2ce4220b6d
Installation:
$ curl -Ls https://gist.githubusercontent.com/andkirby/65607ce983c3a732ff94cc2ce4220b6d/raw | bash -s -- $(cd; pwd)

SemVer sorting using Bash

Sources: https://github.com/rikby/semversort
Installation:
$ curl -Ls https://raw.github.com/rikby/semversort/master/download | bash

sscp - some wrap for scp tool

Sources: https://github.com/rikby/sscp
Installation:
$ curl -Ls https://raw.github.com/rikby/sscp/master/download | bash

xd_swi - PHP Xdebug library switcher

Sources: https://github.com/rikby/xdebug-switcher
Installation:
$ curl -Ls https://raw.github.com/rikby/xdebug-switcher/master/download | bash

Binaries Downloader - tool to download released binaries from GitHub

Sources: https://github.com/rikby/bin-downloader
Lots of my scripts use this tool to make downloading onto a target environment.



I hope some of this list could be useful for you.

No comments: