This file contains 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
geo $allow_client { | |
default no; | |
10.0.1.183 yes; | |
} |
This file contains 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
#!/bin/sh | |
# Sort /etc/hosts file IPv4 only skipping empty lines and commented out ones | |
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n /etc/hosts | grep . | grep -v '^#' |
This file contains 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
import os | |
from flask import Flask, jsonify | |
app = Flask(__name__) | |
@app.route('/api-token-auth/', methods=['POST']) | |
def auth(): | |
# Token generated via | |
# https://jwt.io/#debugger-io?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNlcmdleUBjdW11bHVzbmV0d29ya3MuY29tIiwibmFtZSI6IlNlcmdleSJ9.1-Tg3LW1QTgNkHrBQR2C2I3e_uiY2olfxlsFctAgwrg | |
return jsonify({ |
This file contains 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
#!/bin/sh | |
PORT=8002 | |
SERVER_NAME="127.0.0.1:${PORT}" | |
trap cleanup EXIT | |
cleanup(){ | |
kill $(lsof -ti tcp:$PORT) | |
} | |
[ ! -d venv ] && virtualenv vevn |
This file contains 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
{ | |
"basics": { | |
"name":"Sergey Sudakovich", | |
"label": "Software Enigneer", | |
"email": "sergey@sudakovich.com", | |
"summary": "Experiened software enigneer who I passionate about automation", | |
"profiles":[ { | |
"network": "Github", | |
"username":"sergeyhush", | |
"url": "https://github.com/sergeyhush" |
This file contains 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
#!/bin/bash | |
WATCH_FILE="abc.123" | |
while read oldrev newrev refname; do | |
if [ "$refname" = "refs/heads/master" ]; then | |
if git diff-tree --name-only -r -z $oldrev $newrev | grep --quiet $WATCH_FILE ; then | |
# WATCH_FILE changed... | |
fi | |
fi | |
done |
This file contains 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
#!/bin/bash | |
JENKINS_URL=$1 | |
NODE_NAME=$2 | |
NODE_SLAVE_HOME='/home/build/slave' | |
EXECUTORS=1 | |
SSH_PORT=22 | |
CRED_ID=$3 | |
LABELS=build | |
USERID=${USER} |
OlderNewer