본문 바로가기

IT/etc

Shell tips in Linux 1. when you want to change hostname in Ubuntu , # gksudo gedit /etc/hostname => change name # gksudo gedit /etc/hosts => change 127.0.0.1 hostname here 2. how to grant su privilege to a certain user # sudo vi /etc/sudoers hduserALL=(ALL:ALL) ALL 3. how to add PATH within profile # vi .bashrc export PATH=$PATH:/home/jechul/Downloads/jdk1.6.0_27/bin 더보기
How to stop time sync when using XP in Virtualbox 방금 경험한 일이다. SAS 9.2를 깔려고 하니, 여러 쓰레드에서 시스템의 날짜를 특정일로 변경시켜놓아야 한다고 했다. 처음에 받은 sid 파일은 라이센스가 2009년 여름정도까지 밖에 유효하지 않았다. XP에서 시간변경하는거야 뭐 마우스로 클릭클릭 하면 되는 거잖아 생각하고 있었는데, 어라, 이게 시간을 변경해놓으면 3초 뒤에 다시 원래 시간으로 알아서 돌아가 버리네. 몇번을 시도해봐도 희한하게 시간은 현재시간으로 계속 돌아가버렸다. 인터넷에서 열심히 찾아본다고 했는데, 나는 검색어를 잘못 입력하고 있었다. 내가 찾아봤던 검색어는 how to stop time sync xp 정도 였다. 그러니, 결과는 아주 일반적인 xp에서 타임싱크하는 방법을 가르쳐 줄 뿐이었다. 그런데 결국 이 문제는 virtua.. 더보기
윈도우즈나 리눅스에서 ldap query 하기 You can query ldap in Windows using the following tool : curl * I had to hide private information. ldap Windows test : ldap url needs to be 'enclosed' ###bash bin>curl.exe --user cn=bindusername,cn=Users,dc=na,dc=xx,dc=com:password"ldap://xx.xx.com:389/DC=NA,DC=pg,DC=com?memberOf,sAMAccountName?sub?(sAMAccountName=accountname)" DN: CN=accountname,CN=Users,DC=na,DC=xx,DC=com memberOf: CN=xxxx-SET.. 더보기
soapUI를 가지고 Web Service 테스트 해보기 WSDL address : http://teamspace.xx.com/_vti_bin/sitedata.asmx?WSDL change site URL : http://teamspace.xx.com/sites/abc/_vti_bin/sitedata.asmx traversing listitem would take a lot of time if a list contains lots of them. you can directly fetch listitem when using soapUI. How sweet it is. To get listitem specifically , do this. ###xml ListItem {FA8FE352-86AB-xxxx-9B0C-7E1385C0DF3F} 486 true false 더보기
inum 가지고 find를 해서 파일제거 하기 가끔씩 무슨 이유로 파일 시스템에 이상하게 생긴 이름의 파일이 보일 때가 있다. 아마도 버퍼에 있던 텍스트들이 커맨드라인에서 실행이 되어 버렸을때 나타나는 듯 하다. 그런 파일들은 제거하기가 일단 쉽지가 않다. Somehow file name got corrupted and not possible to delete by typing its name since command line wouldn't take weird characters. In this case, you might want to use find-rm. Here is what you can do. (Assume file's inum is 34406448) ###bash find . -inum 34406448 -exec rm -rf {} \; 더보기
vi 에디터에서 특정 캐릭터를 가지고 개행을 할 경우 When you import some texts to VI editor, you may want to replace a delimiter to new line so that you can easily navigate ###bash :g/^$/d 더보기
티스토리에서 syntax hightlight하기 ###html 검색해보면 여러가지 자료들이 나오는데, 가장 간단한 방법은 위와 같이 tsyntax를 쓰는 방법이다. 이 방법을 이용하면 skin.html에다가 자바스크립트 한개 임포트하는 url거는 걸로 syntax highlighting이 완료한다. 물론, 그 사이트가 접근이 안 된다면 이용할 수 없겠지만.... 사용설명은 초보얌 님께서 잘 설명을 해 주셨다. 인용구 버튼을 클릭하고, 박스안 첫 줄에 언어를 선택(###랭귀지) 하고, 두번째 줄부터 코드를 사용하면 된다. 좀더 자세한 설명은 아래 블로그에서 참조하길 바란다. 개발자 홈페이지 : http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/custom.html http://www.undermyh.. 더보기
how to avoid autorun.inf file getting generated in a folder 서버에 어떤 디렉토리가 있는데, 여기에 계속 autorun.inf파일이 생성되고 있다. 문제는 이 디렉토리를 바탕으로 돌아가는 어플리케이션이 무슨 이유로 디렉토리내에 '파일'만 존재할 것을 요구로 한다. In Windows Server, I have a scheduled task(like cronjob in Linux). It runs once a day and copy files within a folder to other server. But, somehow it keeps generating autorun.inf file on the folder and it is causing the application not behaving correctly. It sounds like autorun.inf i.. 더보기
VB스크립트에서 첨부문서를 가지고 이메일 보내기 윈도우에서 태스크 스케쥴러를 이용해 매일 한번 스크립트를 실행하고 그 결과물을 첨부해서 특정이메일로 보내면, SharePoint서버가 자동으로 그 문서를 업로드하는 것이 요구사항이다. ### vb Dim FSO, dFile, sHTML sHTML = Get_HTML ("http://url-to-send") Set FSO = CreateObject("Scripting.FileSystemObject") Set dFile = FSO.CreateTextFile("filename.csv", True) dFile.Write UniToAsc(sHTML) dFile.Close Set dFile = Nothing Set FSO = Nothing Private Function Get_HTML (up_http) Dim xm.. 더보기
Apache(아파치)에서 크로스 사이트 스크립팅(cross site scripting: xss) 허용하기 You will just need to add ONE line into your apache.conf . ### bash cat xx-apache.conf ServerName "aaa.com" Header set Access-Control-Allow-Origin “*” 더보기