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
firewall-cmd | |
firewall-cmd --zone=public ---add-port=80/tcp --permanent | |
firewall-cmd --zone=public --add-port=80/tcp --permanent | |
firewall-cmd --reload | |
firewall-cmd --list-services | |
firewall-cmd --zone=public --add-service=http --permanent | |
firewall-cmd --zone=public --add-service=https --permanent | |
firewall-cmd --list-services | |
firewall-cmd --reload | |
firewall-cmd --list-services |
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
alias l | |
expansion "load merge terminal" | |
! | |
alias oper | |
expansion "show packages package oper-status" | |
! | |
alias p | |
expansion "package reload force" | |
! | |
alias shc |
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
# Path to Oh My Fish install. | |
set -q XDG_DATA_HOME | |
and set -x OMF_PATH "$XDG_DATA_HOME/omf" | |
or set -x OMF_PATH "$HOME/.local/share/omf" | |
# Load Oh My Fish configuration. | |
source $OMF_PATH/init.fish | |
# ssh key | |
set PUBLIC_KEY $HOME/.ssh/<key>.pub |
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
export LSCOLORS="ExfxcxdxBxegecabagacad" | |
export GIT_INTERNAL_GETTEXT_TEST_FALLBACKS=1 | |
export LC_ALL=en_US.UTF-8 | |
# # linux | |
alias l='ls' | |
alias ll='ls -lart' | |
alias cls='clear' | |
alias c='clear' | |
alias h='history | nl' |
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
import logging | |
from sys import stdout | |
from singleton import Singleton | |
logging.addLevelName(9, "TRACE") | |
logging.TRACE = 9 | |
class Logger(logging.Logger, metaclass=Singleton): |
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
class Singleton(type): | |
_instances = {} | |
def __call__(cls, *args, **kwargs): | |
if cls not in cls._instances: | |
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) | |
return cls._instances[cls] |
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
List of all AWS servers | |
AWS (Amazon Web Services) - this company provides PUBG servers. Not all of them uses in a game, but there is full Server - IP list. Maybe this info can be useful for you: | |
US EAST - North Virginia | |
us-east-1 - 23.23.255.255 | |
us-east-1 - 34.192.0.54 | |
us-east-1 - 34.224.0.252 | |
us-east-1 - 50.17.255.254 | |
us-east-1 - 50.19.255.254 | |
us-east-1 - 52.1.255.254 |
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
class SingleTonPattern: | |
_instance = None | |
def __new__(cls, name, *args, **kwargs): | |
if cls._instance is None: | |
print(f'Creating Instance.') | |
cls._instance = object.__new__(cls, *args, **kwargs) | |
return cls._instance | |
def __init__(self, name, *args, **kwargs): |
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
import json | |
import xml.etree.ElementTree as etree | |
class JSONDataExtractor: | |
def __init__(self, filepath): | |
self.data = dict() | |
with open(file=filepath, mode='r', encoding='utf-8') as fp: | |
self.data = json.load(fp) |
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
# fish environment setup for NCS ncs-4.7.5 | |
set NCS_DIR /Users/<path-to-nso>/nso-4.7.5 | |
set -x PATH $NCS_DIR/bin "$PATH" | |
if [ $DYLD_LIBRARY_PATH ]; | |
set DYLD_LIBRARY_PATH $NCS_DIR/lib | |
else | |
set -x DYLD_LIBRARY_PATH $NCS_DIR/lib "$DYLD_LIBRARY_PATH" | |
end | |
if [ $PYTHONPATH ]; |