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
#!/bin/bash | |
dst=$1 | |
dstport=$2 | |
while [ 1 ]; do | |
ts=$(date +%s.%N) | |
line=$(ss -eipn dst "$dst:$dstport" | grep "bbr") | |
rto=$(echo $line | grep -oP '\brto:.*?(\s|$)' | awk -F '[:,]' '{print $2}' | tr -d ' ') | |
rttvals=$(echo $line | grep -oP '\brtt:.*?(\s|$)' | awk -F '[:/]' '{print $2","$3}' | tr -d ' ') |
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
"Default Header": { | |
"prefix": "header", | |
"body": [ | |
"#!/usr/bin/env python", | |
"# -*- coding: utf-8 -*-", | |
"\"\"\"${1:Custom module name or brief description}.\n", | |
"${2:Enter description of this module}", | |
"", | |
"__author__ = ${3:[authors]}", | |
"__copyright__ = Copyright 2018", |
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
sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/ |
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
docker run -d \ | |
--name=mariadb \ | |
--restart=always \ | |
-v /etc/localtime:/etc/localtime:ro \ | |
-e MYSQL_ROOT_PASSWORD=root \ | |
-v /storage/mariadb:/var/lib/mysql \ | |
-p 3306:3306 \ | |
mariadb:latest | |
docker run -d \ |
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
/** | |
* Get Local IP Address | |
* | |
* @returns Promise Object | |
* | |
* getLocalIP().then((ipAddr) => { | |
* console.log(ipAddr); // 192.168.0.122 | |
* }); | |
*/ | |
function getLocalIP() { |
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
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
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
#!/usr/bin/env python | |
''' | |
_______ ______ | |
|_ _\ \ / / ___| | |
| | \ \ / /\___ \ | |
| | \ V / ___) | | |
|_| \_/ |____/ | |
Teske Virtual System |