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 csv | |
| import ipaddress | |
| import socket | |
| import struct | |
| geo = {} | |
| with open('IP2LOCATION-LITE-DB1.CSV') as db_file: | |
| db = csv.reader(db_file) | |
| for row in db: |
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
| [Unit] | |
| Description=firewalld reload hook - run a hook script on firewalld reload | |
| Wants=dbus-broker.service | |
| After=dbus-broker.service | |
| [Service] | |
| Type=simple | |
| ExecStart=/bin/bash -c '/bin/busctl monitor --system --json=short --match "interface=org.fedoraproject.FirewallD1,member=Reloaded" | while read -r line ; do [ -x /usr/local/sbin/firewalld-reload-hook ] && /usr/local/sbin/firewalld-reload-hook ; done' | |
| [Install] |
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 bash | |
| LAST_TAG=$(git tag --list v*|sort|tail -n 1) | |
| if [[ -z ${LAST_TAG} ]]; then | |
| TAG=$(date +%y.%m.1) | |
| else | |
| LAST_TAG_YEAR=$(echo ${LAST_TAG}|awk -F. '{print $1}') | |
| LAST_TAG_MONTH=$(echo ${LAST_TAG}|awk -F. '{print $2}') | |
| LAST_TAG_BUILD=$(echo ${LAST_TAG}|awk -F. '{print $3}') |
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
| function gen_pool_uuid { | |
| while true; do | |
| POOL_UUID=$(cat /proc/sys/kernel/random/uuid) | |
| if [[ $POOL_UUID =~ ^([a-b]|[d-z]).* ]]; then | |
| echo $POOL_UUID | |
| break | |
| fi | |
| done | |
| } |
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
| // Display time taken by various crypto funcs in nsec., grouped by | |
| // payload length. | |
| struct common_ctx { | |
| void *cc_keysched; | |
| size_t cc_keysched_len; | |
| uint64_t cc_iv[2]; | |
| uint64_t cc_remainder[2]; | |
| size_t cc_remainder_len; | |
| uint8_t *cc_lastp; |
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 | |
| set -ex | |
| if [ -z ${POOL_DISK} ] | |
| then | |
| POOL_DISK="/dev/vda" | |
| fi | |
| if [ -z ${POOL_NAME} ] |