apache : block image direct url request Hint
.htaccess ====================== <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(www.)?owllab.com.*$ [NC] RewriteRule .(jpg|jpeg|png|gif)$ - [NC,F] </IfModule> ====================== or more simple solution! ====================== <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} !([^.@].(?:(?:co|or|gv|ac).)?[a-z]{2,7})@@https?://.(\1)/.* RewriteRule .*.(jpe?g|png|gif|txt|pdf|zip) - [NC,F] </IfModule> ====================== Response Status Code: 403 Forbidden PHP test for regex ====================== <? //$tmp = "www.domain.com@@http://domain.com/dir1/test.php?pg=main&q=qqq"; $tmp = $_SERVER['HTTP_HOST']."@@".$_SERVER['HTTP_REFERER']; echo $tmp; echo "<br>"; echo […]
oracle : dblink number increase - Hint
ORA-02020: too many database links in use select name, value from v$parameter where name='open_links'; alter system set open_links=100 scope=spfile; oracle restart
bash : find and replace all text Hint
find *.txt -type f -print0 | xargs -0 sed -i '' 's/search_keyword/replace_word/g'
mariadb : query monitoring Hint
Logging : Turn On SQL > SET global general_log = 1; Logging : Turn Off SQL > SET global general_log = 0; # tail -f /var/log/mariadb/queries.log
oracle xe : FUNCTION wm_concat
CREATE OR REPLACE TYPE wm_concat_impl AUTHID CURRENT_USER AS OBJECT ( curr_str VARCHAR2 (32767), STATIC FUNCTION odciaggregateinitialize (sctx IN OUT wm_concat_impl) RETURN NUMBER, MEMBER FUNCTION odciaggregateiterate ( SELF IN OUT wm_concat_impl, p1 IN VARCHAR2 ) RETURN NUMBER, MEMBER FUNCTION odciaggregateterminate ( SELF IN wm_concat_impl, returnvalue OUT VARCHAR2, flags IN NUMBER ) RETURN NUMBER, MEMBER FUNCTION odciaggregatemerge […]