This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Main script to prune docker repos in JFrog Repository | |
export PATH=$PATH:/C/jfrog | |
FILTER_REPO="*" # Include all repos | |
#FILTER_REPO="REPO1" # Enable to run this script on particular repo in Jfrog | |
EXCLUDE_BASE_PATH=("Repo2" "Repo3") # Add list of Repos to omit during process | |
PATH_ARR=$(jfrog.exe rt s "<ROOT_LOCATION>/$FILTER_REPO/*/manifest.json" --recursive=false | jq '.[].path' | xargs dirname | xargs dirname | sort | uniq) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# JFrog Cli script to prune docker repositories and keep latest 5 images | |
# This file is called by main.sh script by passing repo name each time | |
# This script can also be called directly by passing "prune-docker-images.sh <docker-image-repo-name>" | |
#check if repo name is passed if not exit | |
[ -f "$1" ] && echo "Path not given " && exit 1 | |
REPO="$1" | |
TMP_LOC="/tmp/a.json" # path to store values temperorily | |
LIMIT=4 # Number of images to keep. Latest is not included |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def attach_handler(app): | |
from flask import redirect, url_for | |
app.wsgi_app = CustomProxyFix(app.wsgi_app) | |
class CustomProxyFix(object): | |
def __init__(self, app): | |
self.app = app | |
def __call__(self, environ, start_response): | |
host = environ.get('HTTP_X_FHOST', '') | |
if host: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def attach_handler(app): | |
from flask import redirect, url_for | |
app.wsgi_app = CustomProxyFix(app.wsgi_app) | |
class CustomProxyFix(object): | |
def __init__(self, app): | |
self.app = app | |
def __call__(self, environ, start_response): | |
host = environ.get('HTTP_X_FHOST', '') | |
if host: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def attach_handler(app): | |
from flask import redirect, url_for | |
app.wsgi_app = CustomProxyFix(app.wsgi_app) | |
class CustomProxyFix(object): | |
def __init__(self, app): | |
self.app = app | |
def __call__(self, environ, start_response): | |
host = environ.get('HTTP_X_FHOST', '') | |
if host: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OAUTH_PROVIDERS = [ | |
{ | |
'name': 'pingid', | |
'icon': 'fa-address-card', | |
'token_key': 'access_token', | |
'remote_app': { | |
'consumer_key': 'PINGFEDERATE_OAUTH_KEY', | |
'consumer_secret': 'PINGFEDERATE_OAUTH_SECRET' | |
'request_token_params': { | |
'scope': 'openid email profile' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def checkseq(nums): | |
desired = [1, 3, 4] | |
if str(desired)[1:-1] in str(nums): | |
return True | |
return False | |
list123([1, 1, 3, 4, 5]) | |
#True | |
list123([1, 2, 4, 3, 5]) | |
#False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module namespace xqlogger = 'urn:sample:xqlogger'; | |
declare variable $xqlogger:LOGDIR as xs:string := "./"; | |
declare variable $xqlogger:LOGFILENAME as xs:string := "a.log"; | |
declare variable $xqlogger:LOGFILESIZE as xs:integer := 100000; (: in bytes :) | |
declare variable $xqlogger:LOGSTATUSMAP := map { | |
0 := "INFO", | |
1 := "WARNING", | |
2 := "ERROR" |