Giter Club home page Giter Club logo

mytinyplayground's Introduction

Tweaks

Everything was written on a Mac OSX Sierra, as that was my work laptop at time.

Repo dedicated to scripts that i feel are useful for daily scripting. A lot of things are specific to my current work. But the goal behidn this remove is to take that ideas and style and put it in one location for me to refer back to in future.

Files:

ZSH Profile

ZSH profile, mainly for back up but has tiny things that come handy.

FUNCTIONS

List of functions I found helpful in a day to day uses.

  • 1.) gitupdate - Update fork repo
  • 2.) changeorg - Change chef orgs
  • 3.) gitstash - Drop unwanted files

Hosts and Aliases

A flag based script used to write alias and maps client VPN IP to hostnames and FQDN to be used for scripting.

Features:

  • Edit /etc/hosts file to add FQDN, VPN IP and hostname
  • Add Aliases to quickly ssh into nodes Only supports for etsops | -f ../muns_mi.report.csv
  • Delete alias and /etc/hosts entries | -w
  • Delete backup files | -w -e
  • Check what shell user has installed

Usage:

Flags Outcome Example
-f, -p alias -f ../muns_mi.report.csv -p $keys/muns_mi/etsops.pem
-f, -p, -e hosts and alias -f ../muns_mi.report.csv -p ../etsops.pem -e
-w delete alias -w munsmi
-w, -e delete alias and hosts -w munsmi -h
-d delete hosts backup -d
-f, -p, -w, -d. -e Loop -f ../muns_mi.report.csv -p $keys/muns_mi/etsops.pem -w munsmi -d -e

Flags Outcome
-h Help
-f Client Csv File
-p Client pem File
-e Must select this option to edit /etc/hosts Write to /etc/hosts file for vpn ip to hostname mapping
-w Delete Alias and hosts *must match hostname format
-d Delete backup copies of hosts files
chmod +x hosts.sh
Usage: ./hosts.sh [-f <csv file> ] [-p <client.pem> ] [-w <clientmnemonics> ] -d

Output:

./hosts.sh -f ../muns_mi.report.csv -p ../etsops.pem -e
Password:
Sorry, try again.
Password:
7.204.108.2 munsmiprd1dns201 munsmiprd1dns201.muns-mi.cernercloud.net - Added
Writing alias munsmiprd1dns201
7.204.108.3 munsmiprd2dns202 munsmiprd2dns202.muns-mi.cernercloud.net - Added
7.204.108.2 munsmiprd1dns201 munsmiprd1dns201.muns-mi.cernercloud.net - Exists
Alias munsmiprd1dns201 already exists

Kill App

A menu driven script to close all app that I don't need after work.

Features:

  • Kills application using signal 15 or 9
  • Quit one application at a time or all of them
  • Confirmation to kill or not
  • Refresh list without quiting script

Apps Added
Microsoft Lync ✔️
Microsoft Onenote ✔️
Citrix Receiver ✔️
iTerm2 ✔️
Microsoft Teams ✔️
Sublime Text ✖️
Slack ✖️
Microsoft Outlook ✖️

Usage:

chmod +x killapp.sh
Usage: ./killapp.sh

Output:

===================================
The Killing Machine - Choose Wisely
Choose one of the options below
-----------------------------------
(Q) Quit
(R) Refresh list
(A) All Application
(1) Microsoft Lync
(2) Microsoft Teams
(3) iTerm
Select an application to close:
Thank you for using the killing machine!

mytinyplayground's People

Contributors

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