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
# first install pygmentize to the mac OS X or macOS system with the built-in python | |
sudo easy_install Pygments | |
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc. | |
alias pcat='pygmentize -f terminal256 -O style=native -g' |
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
# Add the last line either to /etc/samba/smb.conf or | |
# On the webUI, find Services > SMB/CIFS > Settings > Advanced Settings > Extra Options - add the last line here instead | |
# Extra options | |
# https://en.community.sonos.com/advanced-setups-229000/sonos-and-smb-cifs-share-on-openmediavault-6821974 | |
ntlm auth = yes |
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
# https://forums.unraid.net/topic/24356-proftpd-plugin-for-unraid-v68x/?do=findComment&comment=559588 | |
# To enable sftp: | |
# open a shell on your unraid server and issue the following commands | |
cd /etc/ssh | |
ssh-keygen | |
# Enter the name of the keyfile (sftp_rsa_key) and no passphrase. | |
# You will get two files sftp_rsa_key and sftp_rsa_key.pub. The public | |
# key needs to be converted to another format to make it usable by |
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
grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" list-emails.txt | sort | tr '[:upper:]' '[:lower:]' | uniq > emails-extracted.txt |
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
# https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL%3Bd7372159.0810 | |
FSLDIR=/usr/share/fsl/5.0/etc/luts | |
LUT=render3 | |
slicer ${FSLDIR}/colourbar.nii.gz -l ${LUT} -s 2 -i 0 100 -u -z 0 colourbar.png |
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
# https://myfabrix.com/community/tech-notes/photonos-expanding-disk-partition/ | |
echo 1 > /sys/class/block/sda/device/rescan | |
tdnf install parted | |
parted /dev/sda | |
resizepart 2 100% | |
quit |
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 | |
# Restore a Plex database. | |
# Author Scott Smereka | |
# Version 1.0 | |
# Script Tested on: | |
# Ubuntu 12.04 on 2/2/2014 [ OK ] | |
# Plex Database Location. The trailing slash is |
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 | |
# Backup a Plex database. | |
# Author Scott Smereka | |
# Version 1.0 | |
# Script Tested on: | |
# Ubuntu 12.04 on 2/2/2014 [ OK ] | |
# Plex Database Location. The trailing slash is |
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
# ======================================================== | |
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE | |
# ======================================================== | |
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces) | |
uci set network.lan.type='bridge' | |
# assign WAN physical interface to LAN (will be available as an additional LAN port now) | |
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)" | |
uci del network.wan.ifname | |
# Remove wan logical interface, since we will not need it. | |
uci del network.wan |
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 | |
mkdir -p /tmp/certbot/public_html/ | |
cd /tmp/certbot/public_html | |
# forward external port 80 to internal port [unifi-controller-ip]:9000 | |
python -m SimpleHTTPServer 9000 | |
sudo cp -r /etc/letsencrypt/live/unifi.domain.com/ ~/Desktop/certbot/ | |
# renew certificate |