Code Monkey home page Code Monkey logo

scripts-rsp's Introduction

scripts

https://github.com/rsp/scripts

Random shell scripts for different tasks. Mostly for Linux.

Work in progress - more to come.

Some of those scripts were written for my answers on Stack Exchange:

Functions

ok-functions

Usage:

sn1
sn2
sn3
ok
oks

For example to hear when a long-running command finishes and to hear a different sound on success and on failure:

Example with success:

ls / && ls /bin && ls /usr; oks

example with error:

ls / && ls /bim && ls /usr; oks

See ok-functions.md for more info.

Scripts

auu

Usage: sudo auu

Source: https://rawgit.com/rsp/scripts/master/auu

Update and upgrade a Debian, Ubuntu or other APT-based Linux system.

See auu.md for more info.

internalip

Usage: internalip [TARGET]

Source: https://rawgit.com/rsp/scripts/master/internalip

Get internal IP address used for outgoing Internet connections.

TARGET is an IP address, 8.8.8.8 by default, or a host name (if gethostip or getent are available on the system).

See internalip.md for more info.

externalip

Usage: externalip [METHOD]

Source: https://rawgit.com/rsp/scripts/master/externalip

Get external IP address that is visible by servers that you connect to over Internet.

METHOD can be: dns (default), http, https, ftp, telnet.

See externalip.md for more info.

externalip-benchmark

Usage: externalip-benchmark

Source: https://rawgit.com/rsp/scripts/master/externalip-benchmark

Find what services providing external IP address via http and https are the fastest.

See externalip-benchmark.md for more info.

Installation

Most of those scripts should be stand-alone and can be copied in any place.

My recommendation is to make a ~/bin or ~/scripts directory:

mkdir ~/bin

and put this in your ~/.bashrc or ~/.profile:

[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"

That way it's easy to put any script there:

cd ~/bin
wget https://rawgit.com/rsp/scripts/master/example
less example # see what was downloaded
chmod a+x example

And use it at will. Of course always see what was downloaded first.

Author

Rafał Pocztarski - https://github.com/rsp

License

MIT License (Expat). See LICENSE.md for details.

scripts-rsp's People

Contributors

rsp avatar

Watchers

James Cloos avatar Gerrit Beine avatar  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.