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
// To compile use: | |
// C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe .\hide.cs | |
// | |
using System; | |
using System.Runtime.InteropServices; | |
using System.Drawing; | |
namespace AppBar { | |
public enum AppBarMessages | |
{ |
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
upstream nexus_registry { | |
server 10.236.0.5:20080 max_fails=3 fail_timeout=10s; | |
} | |
map $status $nexus_auth { | |
401 'Bearer realm="https://host:8888/v2/token",service="https://host:8888/v2/token"'; | |
} | |
server { | |
listen 8888 ssl; |
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
How to | |
======== | |
copy ddns.config /etc/default/ | |
copy ddns.{service,timer} /etc/systemd/system/ | |
echo "adjust ddns.config ..." | |
vi /etc/default/ddns.config | |
systemctl daemon-reload | |
systemctl enable ddns.timer | |
systemctl start ddns.timer |
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
curl https://gist.githubusercontent.com/hapylestat/1b2c3857c8e70ad5e9527a5152c881e1/raw/87972ed8c5943b9a269de128b532c5b3521fa023/disable_lvm_warnings.sh | bash - |
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
#!/bin/bash | |
_sync(){ | |
sync | |
echo 3 > /proc/sys/vm/drop_caches | |
} | |
DRIVE_MNT=/mnt/storages/$1 |
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
#!/bin/bash | |
declare -A CNS=( | |
[domain]=cert_file_name | |
) | |
KEY_PATH=/etc/ssl/private | |
CERT_PATH=/etc/ssl/certs |
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
#!/bin/bash | |
MYHOST=$1 | |
openssl s_client -showcerts -connect ${MYHOST}:443 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/pki/ca-trust/source/anchors/nginx-selfsigned.crt | |
update-ca-trust; update-ca-trust extract |
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
# Remove sparce space from qcow image | |
# https://serverfault.com/questions/432119/is-there-any-way-to-shrink-qcow2-image-without-converting-it-raw | |
qemu-img convert -O qcow2 source.qcow2 shrunk.qcow2 | |
# show progress bar for tar | |
# https://superuser.com/questions/168749/is-there-a-way-to-see-any-tar-progress-per-file | |
# note: it requires "pv" package to be installed | |
_folder=./folder |
NewerOlder