본문 바로가기

반응형

전체 글

(312)
[node.js] adding .css file to ejs Your problem is not actually specific to ejs. 2 things to note here style.css is an external css file. So you dont need style tags inside that file. It should only contain the css. In your express app, you have to mention the public directory from which you are serving the static files. Like css/js/image it can be done byapp.use(express.static(__dirname + '/public')); assuming you put the css fi..
mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead [duplicate] Simply put, you need to rewrite all of your database connections and queries. You are using mysql_* functions which are now deprecated and will be removed from PHP in the future. So you need to start using MySQLi or PDO instead, just as the error notice warned you. A basic example of using PDO (without error handling):
How to unset a JavaScript variable? I know this is an old thread, but the selected answer isn't clear enough for me. The point is the delete operator removes a property from an object. It cannot remove a variable. So the answer to the question depends on how the global variable or property is defined. (1) If it is created with var, it cannot be deleted. For example:var g_a = 1; //create with var, g_a is a variable delete g_a; //re..
[리눅스] 리눅스 tar, gz 압축 및 해제 리눅스를 사용하다 보면, tar 혹은 tar.gz로 압축을 하거나 압축을 풀어야 할 경우가 자주 생긴다. 이를 처리하기 위해 리눅스에서는 tar 라는 명령어를 사용하게 되는데, tar 명령어도 여러가지 옵션이 있지만 각 옵션에 대해서 알아보기 보단, 자주 사용하는 명령어 패턴만 정리한다. 1. tar로 압축하기 > tar -cvf [파일명.tar] [폴더명] ex) abc라는 폴더를 aaa.tar로 압축하고자 한다면 > tar -cvf aaa.tar abc 2. tar 압축 풀기 > tar -xvf [파일명.tar] ex) aaa.tar라는 tar파일 압축을 풀고자 한다면 > tar -xvf aaa.tar 3. tar.gz로 압축하기 > tar -zcvf [파일명.tar.gz] [폴더명] ex) abc라..
[크롬/Chrome] local file 문서 간 데이터 교환 오류 문제 - (SecurityError: Blocked a frame with origin) local file을 크롬 브라우저로 보는 상황에서 A 문서에서 B 문서를 띄우고 (Parent Window - Child Window) B 문서에서 A 문서의 DOM으로 접속하여 데이터를 보내려는 경우 아래와 같은 에러 메세지를 개발자콘솔창에서 볼 수 있다. Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match. 실제 웹서버로 올려서 실행하는 경우에는 발생하지 않는 문제이나 개발자 테스트 중에 발생 될 수 있는 문제이며, 파이어폭스에서는 정상적으로 수행이 된다. 이는 크롬의 보안 정책이 특정 버전 이후로..
TCP/UDP 주 포트 목록 포트 TCP UDP 설명 상태 0 UDP 예약됨; 사용하지 않음 공식 1 TCP TCPMUX (TCP 포트 서비스 멀티플렉서) 공식 7 TCP UDP ECHO 프로토콜 공식 9 TCP UDP DISCARD 프로토콜 공식 13 TCP UDP DAYTIME 프로토콜 공식 17 TCP QOTD (Quote of the Day) 프로토콜 공식 19 TCP UDP CHARGEN (Character Generator) 프로토콜 - 원격 오류 수정 공식 20 TCP FTP (파일 전송 프로토콜) - 데이터 포트 공식 21 TCP FTP - 제어 포트 공식 22 TCP SSH (Secure Shell) - ssh scp, sftp같은 프로토콜 및 포트 포워딩 공식 23 TCP 텔넷 프로토콜 - 암호화되지 않은 텍스트 ..
[Ubuntu] vsftpd 500 OOPS error 500 OOPS: priv_sock_get_cmd or 500 OOPS: vsftpd: refusing to run with writable root inside chroot() 500 OOPS: priv_sock_get_cmdmacbook:~ PJunior$ ftp username@example.com Connected to example.com. 500 OOPS: priv_sock_get_cmd ftp: Can't connect or login to host `example.com' Open /etc/vsftpd.conf and at the end addseccomp_sandbox=NO and restart the Server:sudo service vsftpd restart 500 OOPS: vsf..
[Ubuntu] SSH 초기 접속 속도 향상시키기 SSH 접속 후 로그인 정보까지 보낸 이후 Shell이 뜨는 속도가 느린 경우가 있습니다. 일반적으로 SSH에 접속을 시도할 때 SSH 데몬에서 DNS를 통해 접속하는 호스트를 확인하는 절차를 거치기 때문입니다. 이 과정을 생략하면 SSH 접속 속도를 향상시킬 수 있습니다. 텍스트 에디터로 /etc/ssh/sshd_config 파일을 열고, 다음 옵션을 수정해 줍니다. /etc/ssh/sshd_config UseDNS no 저장한 다음 SSH 데몬을 재시작해줍니다. sudo service ssh restart 이렇게 하면 기본적으로 DNS 체크를 생략하게 됩니다. 특정 IP에서 접속하는 경우에만 DNS 검사를 생략하려면 /etc/hosts 파일에 접속하는 IP를 기술해주면 됩니다. 출처 : http://..

반응형