Monday, July 19, 2021

Add dummy NIC as service

echo "MACADDR=56:12:b6:2a:aa:34" > /etc/sysconfig/dummy

vim /etc/systemd/system/dummy@.service 

# Remember to run `systemctl daemon-reload` after creating or editing this file.

[Unit]
Description=Dummy network interface for %i
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/sysconfig/%i-dummy
ExecStartPre=/sbin/ip link add %i-dummy address ${MACADDR} type dummy

[Install]
WantedBy=multi-user.target
 
systemctl daemon-reload
systemctl enable dummy@foo.service
systemctl start dummy@foo.service


source:  https://jamielinux.com/docs/libvirt-networking-handbook/appendix/dummy-interface-on-fedora.html

Monday, July 12, 2021

Fedora find all non-ascii characters in a file

grep -n -P "[^\x00-\x7F]" -R --include="*.py" chia/


chia/full_node/full_node.py:910:            f"⏲️  Finished signage point {request.index_from_challenge}/"
chia/full_node/full_node.py:970:            f"🌱 Updated peak to height {record.height}, weight {record.weight}, "
chia/full_node/full_node.py:1361:                f"🍀 ️Farmed unfinished_block {block_hash}, SP: {block.reward_chain_block.signage_point_index}, "
chia/full_node/full_node.py:1576:                    f"⏲️  Finished sub slot, SP {self.constants.NUM_SPS_SUB_SLOT}/{self.constants.NUM_SPS_SUB_SLOT}, "
chia/wallet/wallet_blockchain.py:261:                self.log.info(f"💰 Updated wallet peak to height {block_record.height}, weight {block_record.weight}, ")