Posted
Filed under Linux
- LISTEN 되는 모든 포트
netstat -l 또는 netstat -nap | grep LISTEN

- 모든 서비스 동시 접속자 수
netstat -nap | grep ESTABLISHED | wc -l

- 웹 동시 접속자 수
netstat -nap | grep :80 | grep ESTABLISHED | wc -l

- 웹서버 커넥션수 체크

netstat -n|grep -F :80|egrep '(ESTAB|SYN)'|awk '{print $5}'|sed 's/:[0-9]*//'|sort -u|wc -l
  

2017/08/18 10:01 2017/08/18 10:01
Posted
Filed under Htm&Javascript
<table id="test" />
<button type="button" onclick="tableToExcel('test')" />

페이징이 없는 테이블 데이터를 받을 때 쓸만합니다.
한글 처리 핵심은 %EF%BB%BF


function
tableToExcel(id) {
    var data_type = 'data:application/vnd.ms-excel;charset=utf-8';
    var table_html = encodeURIComponent(document.getElementById(id).outerHTML);
 
    var a = document.createElement('a');
    a.href = data_type + ',%EF%BB%BF' + table_html;
    a.download = id+'_excel'+'.xls';
    a.click();
}
[참조]https://phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=81515
2017/07/27 08:58 2017/07/27 08:58
Posted
Filed under Mysql

날짜 중복확인:

(('사용자입력시작일' <= DB시작일 and DB시작일 <= '사용자입력종료일') or ('사용자입력시작일' <= DB종료일 and DB종료일 <= '사용자입력종료일') or (DB시작일 <= '사용자입력시작일' and '사용자입력종료일' <= DB종료일)) 

2017/07/18 13:38 2017/07/18 13:38
Posted
Filed under 분류없음
2017년 3월 11일 결혼 하려고 합니다.
청첩장을 찾던 중 우연히 바른손 카드 www.barunsoncard.com
문하게 되었습니다. 
그래서 샘플을 신청했고 , 
10가지 신청 했는대 바로 다음날 배송이 되었습니다. 

샘플마다 너무 깔끔 하고 , 이뻐서 어떤것을 
선택 해야 할지 고민 하고 있습니다. 
오늘 내일 고민해서 선택 해야 겠습니다.

2017/01/11 21:23 2017/01/11 21:23
Posted
Filed under nginx

이미지 외부링크 차단하기

이미지 외부링크 차단하기 에 대한 설명이며
Nginx 기준입니다.
nginx.conf file에 아래의 정보를 추가하시면 됩니다.


localtion ~\.(jpg?g|png|gif)${

   valid_referers none blocked domain.com*.domain.com;
   if($invalid_referer){
       return403;
   }
}
2016/12/02 14:23 2016/12/02 14:23
Posted
Filed under JSP, JAVA

1. 맨 끝에 있는 콤마(,)를 제거하는 경우


<update id="updateAuthorIfNecessary" parameterType="domain.blog.Author">

UPDATE AUTHOR
<trim prefix="SET" suffixOverrides=",">
<if test="username != null">username=#{username},</if>
<if test="password != null">password=#{password},</if>
<if test="email != null">email=#{email},</if>
<if test="bio != null">bio=#{bio},</if>
</trim>
WHERE id=#{id}
</update>
 
맨앞에 SET을 붙이고 if안에 무엇이 들어가도 맨 끝에 있는 콤마를 지우겠다는 것이다.
 
 
 
2. 맨 앞에 있는 연산자를(AND 또는 OR) 제거하는 경우
 
 
<select id="selectInfo" parameterType="domain.blog.Author" resultType="authorResultMap">
 SELECT * FROM AUTHOR
 <trim prefix="WHERE" prefixOverrides="AND |OR">
<if test="username != null>AND username=#{username}</if>
<if test="password != null>OR password=#{password}</if>
<if test="email != null>AND email=#{email}</if>
</trim>
2016/12/01 15:08 2016/12/01 15:08
Posted
Filed under 웹표준
<input type="number" pattern="[0-9]*" inputmode="numeric" placeholder="">
2016/12/01 11:08 2016/12/01 11:08
Posted
Filed under Mysql


-- Maria DB max connection 수 확인

SHOW VARIABLES LIKE '%max_connection%'

-- Maria DB에 접속되어 있는 client 정보 리스트

SHOW PROCESSLIST;

-- Maria DB max connection 수 조절

SET GLOBAL max_connections = 10000;

//status 관련 값
show status like '%CONNECT%';

Max_used_connections <--현재 연결된 접속수

Threads_connected  <-- 연결되었던 최대 접속수

2016/10/13 09:45 2016/10/13 09:45
Posted
Filed under C#

using System;

class Program {
    static void Main(string[] args) {
        System.AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionTrapper;
        throw new Exception("Kaboom");
    }

    static void UnhandledExceptionTrapper(object sender, UnhandledExceptionEventArgs e) {
        Console.WriteLine(e.ExceptionObject.ToString());
        Console.WriteLine("Press Enter to continue");
        Console.ReadLine();
        Environment.Exit(1);
    }
}

// c#에서 Console(콘솔) 어플리케이션에서 글로벌 에러 처리
   반복 작업시 유용하게 이용

 

 

2016/10/13 09:14 2016/10/13 09:14
Posted
Filed under PHP
config.inc.php
add to below end of line !~
$cfg['LoginCookieValidity']=3600*24*365;
2016/05/19 17:20 2016/05/19 17:20