Skip to content

Instantly share code, notes, and snippets.

@yoonsak
yoonsak / selinux-log
Created March 6, 2025 13:49
selinux allow log outside /var/log
ls -lZ /var/log /opt/tomcat/logs
chcon --reference /var/log /opt/tomcat/logs
ls -lZ /var/log /opt/tomcat/logs
see also:
https://unix.stackexchange.com/questions/79311
@yoonsak
yoonsak / firewall-cmd
Last active March 6, 2025 13:47
firewall-cmd
firewall-cmd --state
firewall-cmd --get-zones
firewall-cmd --get-default-zone
firewall-cmd --get-active-zones
cat /usr/lib/firewalld/services/myapps.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>My Apps</short>
@yoonsak
yoonsak / change_dpi_on_win10_rdp
Created November 19, 2024 12:11
change dpi on win10 rdp
change dpi on win10 rdp
https://community.citrix.com/forums/topic/250474-advanced-setting-dpi-scaling-on-server-2022-build-2108
Computer Configuration
Administrative Templates
Windows Components
Remote Desktop Services
Remote Desktop Session Host
Remote Session Environment
@yoonsak
yoonsak / ol9_ssh_to_centos6.md
Last active August 18, 2024 12:22
ol9_ssh_to_centos6

Error in libcrypto connecting RHEL 9 server to Centos 6 via SFTP/SSH
https://serverfault.com/questions/1125843

create ~/.ssh/config

Host centos6
  RSAMinSize 1024
  KexAlgorithms +diffie-hellman-group14-sha1
  MACs +hmac-sha1

HostKeyAlgorithms +ssh-rsa

##
## Adding third-party modules to nginx official image
## https://github.com/nginxinc/docker-nginx/tree/master/modules
##
## Nginx 3rd party modules
## https://www.nginx.com/resources/wiki/modules/
##
## nginx_ajp
## https://github.com/yaoweibin/nginx_ajp_module
## https://github.com/yaoweibin/nginx_ajp_module/issues/51
@yoonsak
yoonsak / graphic-console
Last active January 30, 2024 03:12
make graphic console for vm
/etc/X11/xorg.conf.d/50-device.conf
Section "Device"
Identifier "Device0"
Driver "vmware"
EndSection
##
## find cvt line mode
## https://forums.opensuse.org/t/how-change-screen-resolution/133611
##
@yoonsak
yoonsak / clear_vcsa_log
Created December 14, 2023 14:00
Clear VCSA log
##
## clear vcsa log
##
cd /storage/log/vmware
find ./ -name *2021-* -exec ls -1 {} \;
find ./ -name *2021-* -exec rm -rfv {} \;
find ./ -name *2022-* -exec ls -1 {} \;
@yoonsak
yoonsak / dokcker-compose-gen2.md
Created September 21, 2022 03:47
docker-compose gen2

rename prvious version

mv -v /usr/lib/docker/cli-plugins/docker-compose /usr/lib/docker/cli-plugins/docker-compose.old

install new version

mkdir -pv /usr/lib/docker/cli-plugins  

VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d '"' -f 4 | tr -d 'v')

@yoonsak
yoonsak / clear_docker_log.md
Created September 21, 2022 03:43
clear docker container log file

find log size of each container

du -h $(docker inspect --format='{{.LogPath}}' $(docker ps -qa))

clear all container log

truncate -s 0 /var/lib/docker/containers/*/*-json.log