Git Product home page Git Product logo

powershell's Introduction

Powershell shortcuts

Powershell profile with useful functions

Description

Adds some shortcuts and usefull commands to the PowerShell

Contents

Install

  1. Copy PowerShell_profile.ps1 to your $profile path
  2. Create a variables.ps1 file in the same directory
  3. Reload profile with . $profile

Usage

watch

watch <command>
watch kubectl get pods

find_port

Shows the process that is listening on a given port

find_port <port>

reload

Reloads the path environment variable, so newly installed programs can be used directly

reload

remote_branches

List all remote branches of the current git directory together with the author

dev (volumeOrDirectoy)

Spin up your dev environment as a docker container, either by specifying a directory e.g. dev . to mount the current directory into the development environment or by specifying a docker volume name such as dev avatar, or by entering your REMOTE_DEV_ENV with the dev command without a parameter.

dev_create

Creates a new volume with the specified and sets a label so that it can be easily identified as a development volume.

dev_list

List all volumes with the dev tag

dev_stop

Stop all running dev containers

dev_pull

Pull the latest version of the DOCKER_DEV_ENV

dev_tags

List all local available tags of the DOCKER_DEV_ENV

Parameters

All parameters are persisted in `~/.environments.json' along with the environment name, and are automatically loaded when an environment is started. The values are overridden and overwritten if a parameter is specified. To clear the parameters for an environment, provide the option with a value of 'null'.

parameter descrption example
Port specifiy which port should be exposed to the host system dev . -Port 4200
Tag specifiy a specific tag that should be used from the DOCKER_DEV_ENV default is latest dev . -Tag golang

update

Update this repository with a git pull to keep up with the latest changes.

Options

Following variables can be set in the variables.ps1.

name description example
DOCKER_DEV_ENV docker image to use for the dev environment registry.tpoe.dev/dev
REMOTE_DEV_ENV comma seperated list of 'ssh connection' strings 192.168.0.1,192.168.0.2
SSH_DIRECTORY directory that include ssh keys to be used in the dev container C:/Users/thomas/.ssh
GPG_DIRECTORY directory that include gpg configurations "C:/Users/thomas/.gnupg"
SHARED_DIRECTORY directory that is mounted to easily exchange files between the host system and the development environment "C:/Users/thomas/shared"
KUBE_DIRECTORY directory that include kubectl configuration C:/Users/thomas/.kube
NGROK_DIRECTORY directory that include ngrok configuration C:/Users/thomas/.ngrok

Next

  • Find a way to mount the docker credentials from the windows credentials manager into the docker container

Team

License

MIT

This repository was generated by charon

powershell's People

Contributors

perryrh0dan avatar perryrh0dan2 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.