Shorten cwd in bash and show git branch, if cwd is git repo
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='\[\033[01;34m\]\W\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
Shorten cwd in bash and show git branch, if cwd is git repo
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='\[\033[01;34m\]\W\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
from flask import Flask, request | |
from flasgger import Swagger | |
app = Flask(__name__) | |
Swagger(app) | |
@app.route('/') | |
def main_route(): | |
""" | |
Test Endpoint |
import gi | |
gi.require_version('Gst','1.0') | |
gi.require_version('GstVideo','1.0') | |
gi.require_version('GstRtspServer','1.0') | |
from gi.repository import Gst, GObject, GstRtspServer, GstRtsp | |
Gst.debug_set_active(True) | |
Gst.debug_set_default_threshold(3) |