# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again ulimit -c unlimited
mac : tts lame ffmpeg : aiff m4a mp3 convert Hint
say -v Yuna -o filename.aiff -f filename.txt -r 200 lame filename.aiff filename.mp3 ffmpeg filename.mp3 -i filename.m4a -codec:a libmp3lame -qscale:a 1
CentOS 7 : rpm db error - rebuid Hint
mkdir /var/lib/rpm/out mv /var/lib/rpm/__db* /var/lib/rpm/out yum install ....
WP : SSL Hint
.htaccess <ifModule mod_headers.c> # Header set Access-Control-Allow-Origin: * #Header add Content-Security-Policy "default-src 'self';" Header always set Content-Security-Policy "upgrade-insecure-requests;" </ifModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> Optional wp-config.php define('FORCE_SSL_ADMIN', true); define('WP_HOME',''.$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/wordpress'); define('WP_SITEURL',''.$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/wordpress');
open ssl : letsencrypt - certbot Hint
# certbot certonly --webroot -w /home/testdomain/public_html -d www.testdomain.com Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel): owl@owl.co.kr - - - - - - - - - - - - - - - - - - - […]
Fedora 31 : rsyncd.log logrotate Hint
vi /etc/logrotate.d/syslog or vi /etc/logrotate.d/rsyslog /var/log/cron /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/rsyncd.log { missingok sharedscripts postrotate /usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true endscript } logrotate --force --verbose /etc/logrotate.conf vi /etc/cron.daily/logrotate #!/bin/sh /usr/sbin/logrotate […]
Linux : ps memory size human readable Hint!
ps -eo pmem,comm,pid,maj_flt,min_flt,rss,size,vsize,pcpu,time --sort -rss | numfmt --header --to=iec --field 4-5 | numfmt --header --from-unit=1024 --to=iec --field 6-8 | column -t | head -n 20 vi psmem.sh #!/bin/bash ps -eo pmem,comm,pid,maj_flt,min_flt,rss,size,vsize,pcpu,time --sort -rss | numfmt --header --to=iec --field 4-5 | numfmt --header --from-unit=1024 --to=iec --field 6-8 | column -t $@ # psmem.sh […]
Fedora 31 : grc tail log edit color config Hint
yum install grc vi /usr/share/grc/conf.log # Error regexp=\bError\b colours=bold red grc tail -f /var/log/messages
mariadb : dblink Hint
-- 1. create database for dblink create database IF NOT EXISTS dblink1; -- 2. check dblink for FEDERATED plugin support. show engines; -- FEDERATED -- install plugin federated soname 'ha_federated.so'; -- 3. create server for dblink drop server IF EXISTS dblink1; CREATE SERVER IF NOT EXISTS dblink1 FOREIGN DATA WRAPPER mysql OPTIONS (USER […]
bash : prepend string to file
# sed -i '1s;^;SET sql_mode="ORACLE,EMPTY_STRING_IS_NULL"\;\n;' test.sql