This file contains 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
package lol.gilliard; | |
import com.amdelamar.jotp.OTP; | |
import com.amdelamar.jotp.type.Type; | |
import java.io.IOException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
// This code uses Austin Delamar's JOTP: https://github.com/amdelamar/jotp |
This file contains 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
From https://synocommunity.com add http://packages.synocommunity.com to your NAS package sources. | |
For that, go to NAS->Package Cnter->Click Settings->Package Sources tab. | |
Then from the community, you can see Mosquitto. Install it. | |
After installing, please stop the Mosquitto service before updating configuration. You can start service after changes. | |
Enable Admin login for Synology | |
Enable SSH in NAS | |
Download putty and connect to NAS Server | |
Login using admin | |
Change to root user [sudo -i, {use admin password}] | |
Find mosquitto.conf file [find / -name mosquitto.conf] |
This file contains 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
# The setup command allows filtering facts | |
# More info: https://docs.ansible.com/ansible/latest/modules/setup_module.html | |
# inventory_file = path to inventory file (if not normal role layout) | |
# host_group = group to query. use all for all hosts | |
ansible -i inventory_file host_group -m setup -a 'filter=ansible_distribution_version' | |
# For a Ubuntu Bionic Host the distribution facts look like this: | |
# "ansible_distribution": "Ubuntu", | |
# "ansible_distribution_file_parsed": true, | |
# "ansible_distribution_file_path": "/etc/os-release", |
This file contains 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 install libresample1 | |
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb | |
sudo dpkg -i libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb | |
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb | |
sudo dpkg -i libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb | |
wget https://www.dropbox.com/s/gg2i5wszrqkhzy8/clickshare_01.07.01-79_amd64.deb?dl=0# | |
sudo dpkg -i clickshare_01.07.01-79_amd64.deb |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
- Create a file called
.gitignore
in your home directory and add any filepath patterns you want to ignore. - Tell git where your global gitignore file is.
Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignore
for.gitignore
in your home directory, if you prefer.
This file contains 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
# Create the "certification authority". The private key of CA does not have to (and must not) be copied anywhere. | |
user@home$ ssh-keygen /home/user/.ssh/certification_authority | |
# Make CA public key trusted on a server. | |
user@home$ scp /home/user/.ssh/certification_authority.pub root@server: | |
root@server# cd; (echo -n "cert-authority "; cat certification_authority.pub ) >> .ssh/authorized_keys | |
# Generate a certificate for any command you can think of | |
# Example -- command: "tailf /var/log/messages" validity: 52 weeks from now Permissions: none (no forwarding etc.) | |
user@home$ ssh-keygen -f tailfmessages.key |
This file contains 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
# ps1 | |
if true; then | |
OFF="\[\033[0m\]" | |
BLACK="\[\033[0;30m\]" | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[0;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[0;34m\]" | |
MAGENTA="\[\033[0;35m\]" | |
CYAN="\[\033[0;36m\]" |