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 systemctl disable systemd-resolved | |
sudo rm -v /etc/resolv.conf | |
echo "nameserver 9.9.9.9" | sudo tee /etc/resolv.conf | |
sudo apt install dnsmasq -y | |
# https://opensource.com/article/18/3/manage-workstation-ansible | |
# https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu | |
# https://stackoverflow.com/questions/39819378/ansible-get-current-target-hosts-ip-address | |
# Currently ubuntu 20.04 focus does not have a ppa repo | |
# https://stackoverflow.com/a/61922637 |
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
lsblk | |
sudo fdisk /dev/xvdf | |
sudo mkfs -t ext4 /dev/xvdf1 | |
mount /dev/xvdf1 /mnt | |
sudo rsync -aulvXpogtr /var/* /mnt | |
umount /mnt | |
sudo nano /etc/fstab | |
/dev/xvdf1 /var ext4 defaults,noatime,nofail 0 2 |
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
curl -s https://gist.githubusercontent.com/ilude/bf6d435352610528794d5cac4a0845a1/raw/%21ImageSetup.sh | /bin/bash -s | tee build.log |
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
# Fix “invalid or corrupted package (PGP signature)” | |
sudo pacman -S archlinux-keyring | |
# update system --noconfirm | |
sudo pacman -Su | |
# remove package | |
sudo pacman -R <package_name> | |
# add package |
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
input=<>.mkv | |
output=<>.mp4 | |
ffmpeg -i ${input} -vcodec libx265 -crf 20 ${output} | |
# https://stackoverflow.com/questions/23775693/best-video-format-using-ffmpeg-converter?rq=1 | |
"-b:v 200k -vcodec libx264 -acodec aac -b:a 96k -strict -2" |
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
#idVendor 0x0b67 Fairbanks Scales | |
#idProduct 0x555e SCB-R9000 | |
sudo apt-get update | |
sudo apt-get install -y ruby ruby-dev bundler samba samba-common-bin libusb-dev libhidapi-hidraw0 libhidapi-libusb0 | |
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig | |
sudo bash -c "cat /dev/null > /etc/samba/smb.conf" | |
sudo tee -a /etc/samba/smb.conf >/dev/null <<'EOF' | |
[global] |
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 | |
# create the default iplist | |
sudo ipset create -exist cf4 hash:net | |
# check if the iptables rule exists and create it if it does not exist | |
sudo iptables -C INPUT -m set --match-set cf4 src -p tcp --dport 4443 -j ACCEPT > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
echo "cf4 rule already exists!" | |
else |
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
#http://www.oidview.com/mibs/0/IF-MIB.html | |
#http://www.net-snmp.org/docs/mibs/interfaces.html | |
cisco_custom: | |
version: 2 | |
auth: | |
community: public | |
walk: | |
- 1.3.6.1.2.1.2.2.1 | |
- 1.3.6.1.2.1.31.1.1.1 | |
metrics: |
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 apt-get install -y samba samba-common-bin | |
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig | |
sudo tee -a ./smb.conf >/dev/null <<'EOF' | |
[global] | |
# 3 to debug | |
log level = 0 | |
workgroup = WORKGROUP | |
server string = Samba Server %v | |
netbios name = pathfinder-2 | |
security = user |