# copy cluster's certificate to a file
vi cluster-certificate.txt
# Set cluster
kubectl config set-cluster <CLUSTER_NAME> --server=https://37.187.1.138:6443 --certificate-authority=cluster-certificate.txt --embed-certs=true
# Set credentials
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
| <?php | |
| # Sometimes, you need to disable Wordpress updates because you prefer to update your Dockerfile or Helm chart. | |
| # Source : https://wordpress.org/support/article/configuring-automatic-background-updates/ | |
| # function.php or a custom plugin | |
| add_filter( 'automatic_updater_disabled', '__return_true' ); | |
| add_filter( 'auto_update_core', '__return_true' ); | |
| add_filter( 'auto_update_translation', '__return_false' ); | |
| add_filter( 'auto_core_update_send_email', '__return_false' ); |
Source: https://github.com/SynoCommunity/spksrc/wiki/Synology-Used-Ports
| Application/Service | Protocol | Port |
|---|---|---|
| FTP | TCP | 20, 21, 55536, 55537 |
| SSH | TCP | 22 |
| Telnet | TCP | 23 |
| SMTP | TCP | 25 |
| DNS | Both | 53 |
| DHCP | UDP | 67-68 |
For macOS, the date utility doesn't give the right information. You need to install GNU date utility.
brew install coreutilsHomebrew will install the utility as gdate instead of date, which leaves the original date untouched and available.
gdate has an --iso-8601 option available, but it doesn't give a format that strictly follows the ISO 8601 standard, as far as I can determine. I find it better to explicitly state the format with:
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://explainshell.com/explain?cmd=find+-E+.+-regex+%27.*%2F%5B%5E%2F%5D%7B43%2C%7D%27 | |
| find -E . -regex '.*/[^/]{42,}' | |
| # Common problem faced when you need to copy files to an encrypted volume. | |
| # You could also create a ZIP of your files and save it into the encrypted volume. | |
| # Or, you could just create another volume into this encrypted volume. |
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 uuidv4() { | |
| return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => | |
| (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) | |
| ) | |
| } |
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/sh | |
| for file in *.vue; do | |
| cat prepend.txt $file >> $file.$$ | |
| mv $file.$$ $file | |
| done | |
| for file in *.vue; do | |
| cat $file append.txt >> $file.$$ | |
| mv $file.$$ $file | |
| 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
| # https://explainshell.com/explain?cmd=for+file+in+.%2F**%2F**.%7Bpng%2Cjpg%2Cico%2Csvg%7D%3B+do+convert+%22%24file%22+-fill+black+-draw+%27color+0%2C0+reset%27+%22%24file%22%3B+printf+%27.%27%3B+done | |
| for file in ./**/**.{png,jpg,ico,svg}; do convert "$file" -fill black -draw 'color 0,0 reset' "$file"; printf '.'; done |