All Projects → oldratlee → Useful Scripts

oldratlee / Useful Scripts

Licence: apache-2.0
🐌 useful scripts for making developer's everyday life easier and happier, involved java, shell etc.

Programming Languages

shell
77523 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Useful Scripts

Vcspull
🔄 synchronize projects via yaml/json manifest. built on libvcs
Stars: ✭ 187 (-96.8%)
Mutual labels:  terminal, vcs
Saws
A supercharged AWS command line interface (CLI).
Stars: ✭ 4,886 (-16.26%)
Mutual labels:  terminal
Tilix
A tiling terminal emulator for Linux using GTK+ 3
Stars: ✭ 4,670 (-19.97%)
Mutual labels:  terminal
Termit
Translations with speech synthesis in your terminal as a ruby gem
Stars: ✭ 505 (-91.35%)
Mutual labels:  terminal
Gradient String
🌈 Beautiful color gradients in terminal output
Stars: ✭ 476 (-91.84%)
Mutual labels:  terminal
Dotfiles
Settings for various tools I use.
Stars: ✭ 513 (-91.21%)
Mutual labels:  terminal
Bubbles
TUI components for Bubble Tea 🍡
Stars: ✭ 467 (-92%)
Mutual labels:  terminal
Nve
Run any command on specific Node.js versions
Stars: ✭ 531 (-90.9%)
Mutual labels:  terminal
Kibi
A text editor in ≤1024 lines of code, written in Rust
Stars: ✭ 522 (-91.05%)
Mutual labels:  terminal
Termplay
GitLab: https://gitlab.com/jD91mZM2/termplay
Stars: ✭ 500 (-91.43%)
Mutual labels:  terminal
Rtv
Browse Reddit from your terminal
Stars: ✭ 4,558 (-21.89%)
Mutual labels:  terminal
Cabal Cli
Terminal client for Cabal, the p2p chat platform.
Stars: ✭ 479 (-91.79%)
Mutual labels:  terminal
Whipper
Python CD-DA ripper preferring accuracy over speed
Stars: ✭ 517 (-91.14%)
Mutual labels:  terminal
Fltrdr
A TUI text reader for the terminal.
Stars: ✭ 477 (-91.83%)
Mutual labels:  terminal
Command Line Args
A mature, feature-complete library to parse command-line options.
Stars: ✭ 525 (-91%)
Mutual labels:  option-parser
Gobackup
🗄 Simple tool for backup your databases, files to FTP / SCP / S3 storages.
Stars: ✭ 472 (-91.91%)
Mutual labels:  terminal
Tio
tio - A simple TTY terminal I/O application
Stars: ✭ 489 (-91.62%)
Mutual labels:  terminal
Tui Rs
Build terminal user interfaces and dashboards using Rust
Stars: ✭ 6,081 (+4.22%)
Mutual labels:  terminal
Termcolor
Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force.
Stars: ✭ 533 (-90.87%)
Mutual labels:  terminal
World Cup 2018 Cli Dashboard
⚽🏆A World Cup 2018 CLI dashboard – Watch matches in your terminal
Stars: ✭ 529 (-90.93%)
Mutual labels:  terminal

🐌 useful-scripts

repo-icon

Build Status GitHub release License Chat at gitter.im
GitHub Stars GitHub Forks GitHub issues GitHub Contributors

👉 把平时有用的手动操作做成脚本,以便捷地使用。

欢迎 👏 💖

本仓库的脚本(如Java相关脚本)在阿里等公司(如随身云,见awesome-scripts仓库说明)的线上生产环境部署使用。

如果你的公司有部署使用,欢迎使用通过 Issue:who's using | 用户反馈收集 告知,方便互相交流反馈~ 💘



🔰 快速下载&使用

source <(curl -fsSL https://raw.githubusercontent.com/oldratlee/useful-scripts/release-2.x/test-cases/self-installer.sh)

更多下载&使用方式,参见下载使用

📚 使用文档

Java相关脚本

  1. show-busy-java-threads
    用于快速排查JavaCPU性能问题(top us值过高),自动查出运行的Java进程中消耗CPU多的线程,并打印出其线程栈,从而确定导致性能问题的方法调用。
  2. show-duplicate-java-classes
    找出jar文件和class目录中的重复类。用于排查Java类冲突问题。
  3. find-in-jars
    在目录下所有jar文件里,查找类或资源文件。

🐚 Shell相关脚本

Shell使用加强:

  1. c
    原样命令行输出,并拷贝标准输出到系统剪贴板,省去CTRL+C操作,优化命令行与其它应用之间的操作流。
  2. coat
    彩色cat出文件行,方便人眼区分不同的行。
  3. a2l
    按行彩色输出参数,方便人眼查看。
  4. uq
    不重排序输入完成整个输入行的去重。相比系统的uniq命令加强的是可以跨行去重,不需要排序输入。
  5. ap and rp
    批量转换文件路径为绝对路径/相对路径,会自动跟踪链接并规范化路径。
  6. cp-into-docker-run
    一个Docker使用的便利脚本。拷贝本机的执行文件到指定的docker container中并在docker container中执行。
  7. tcp-connection-state-counter
    统计各个TCP连接状态的个数。用于方便排查系统连接负荷问题。
  8. xpl and xpf
    在命令行中快速完成 在文件浏览器中 打开/选中 指定的文件或文件夹的操作,优化命令行与其它应用之间的操作流。

Shell开发/测试加强:

  1. echo-args
    输出脚本收到的参数,在控制台运行时,把参数值括起的括号显示成 红色,方便人眼查看。用于调试脚本参数输入。
  2. console-text-color-themes.sh
    显示Terminator的全部文字彩色组合的效果及其打印方式,用于开发Shell的彩色输出。
  3. parseOpts.sh
    命令行选项解析库,加强支持选项有多个值(即数组)。

VCS相关脚本

目前VCS的脚本都是svn分支相关的操作。使用更现代的Git吧! 💥

因为不推荐使用svn,这里不再列出有哪些脚本了,如果你有兴趣可以点上面链接去看。

🎓 Developer Guide

为用户提供有用的功能当然是这个库的首要的价值体现和存在理由。

但作为一个开源项目,每个人都可以看到源码实现,这个库或许能做得更多。

🎯 面向开发者的目标

  • 期望体现Shell/Bash脚本生产环境级的严谨开发方式与最佳实践,进而有可能示例改善在生产环境中Shell脚本的质量状况。
  • Shell/Bash看作线上生产环境可使用的专业语言。

PS:

  • 虽然上面是自己期望的目标,但自己在Shell语言上一定会有很多理解和使用上的问题、在这些实现脚本中也会很多需要的改进,可以一起学习、讨论与实践~ 💕
  • 这个库中脚本的实现也有使用Python

关于Shell脚本

命令行(CLI)几乎是每个程序员几乎每天都要使用的工具。相比图形界面工具(GUI),命令行有着自己不可替代的便利性和优越性。

命令行里写出来其实就是Shell脚本,可以说每个开发者会写Shell脚本(或多或少)。在生产环境的功能实现中,也常会看到Shell脚本(虽然不如主流语言那么常见)。

可能正因为上面所说的Shell脚本的便利性和大众性,Shell脚本有不少是顺手实现的(包括生产环境用的Shell脚本),Shell脚本的实现常常可能质量不高。

🚦 开发约定

这个库里,Shell脚本统一使用Bash 3+

原因是:

  • 个人系统学习过的是Bash,比较理解熟悉。
  • Bash目前还是Shell编程主流,并且基本上缺省部署了。
    PS: 虽然交互Shell个人已经使用Zsh,但在严谨的Shell脚本开发时还是使用Bash

📚 Shell学习与开发的资料

更多资料参见 子文档

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].