2014. 7. 12. 17:30

There is a sample.


TestHandleBars.zip


reference : http://handlebarsjs.com


Posted by CoolDragon
2014. 5. 14. 19:08

1) root 권한 획득

  $ sudo -s


2) 계정생성

  # useradd 사용자ID


3) 비밀번호생성

  # passwd test


4) 계정삭제

  # userdel 사용자ID


5) 계정생성확인

   vi /etc/passwd

   vi /etc/shadow

   vi /etc/group


6) root 권한 주기

"사용자ID  is not in the sudoers file.  This incident will be reported." 라고 메시지가 나온다면..

# vi /etc/sudoers 하면 아래 내용에 다음과 같은 줄이 있다.

....

   root ALL=(ALL) ALL #처럼 바래 아래 줄에

   사용자ID ALL=(ALL) ALL #으로 동일하게 설정해준다.

....


Posted by CoolDragon
2014. 4. 12. 16:14

catch on ~

1) 유행하다, 인기를 끌다

2) 이해하다, ~이 사실이라고 알다. 파악하다


예문

1) This novel will be caught on

2) I should have cought on when she started going to dentist four or five times a week.



Posted by CoolDragon
2014. 4. 12. 15:57

be turned on by ~ : ~에 끌리다

예문

was more turned on by gravy boat than by Barry.

Barry 보다 고기스프 그릇에 더 끌렸다.



Posted by CoolDragon
2014. 4. 11. 00:49

sudo apt-get remove openssh-client openssh-server

sudo apt-get update

sudo apt-get install openssh-client openssh-server

Posted by CoolDragon
2014. 4. 11. 00:45

Set Network

- first of all, you should check mac address

  - Adaptor 1 :  NAT

  - Adaptor 2 :  Host Dedicated Adaptor


[Install Ubuntu]

- set static IP

$ sudo vi /etc/network/interfaces

  auto lo

  iface lo inet loopback


  auto eth0 # NAT 

  iface eth0 inet dhcp


  auto eth1 # Host Dedicated Adaptor

  iface eth1 inet static

        address 192.168.56.102   # you can find the basic IP(192.168.56.1) in network tab, VirtualBox preference

        netmask 255.255.255.0


$ sudo /etc/init.d/networking restart

#새로 추가된 IP에 매칭된 이더넷카드 실행을 해준다.

$ sudo ifdown eth0

$ sudo ifdown eth1

$ sudo ifup eth0

sudo ifup eth1


$ nslookup www.daum.net

  ※ if you can't well, please see this link

     (http://forum.falinux.com/zbxe/index.php?document_srl=532721&mid=lecture_tip)

     $ vi /etc/udev/rules.d/70-persistent-net.rules

     $ sudo rm /etc/udev/rules.d/70-persistent-net.rules




더 설명이 좋은 링크: https://gist.github.com/wacko/5577187

Posted by CoolDragon
2013. 11. 19. 11:36

개발 준비가 완료된 후 

ASP.NET 샘플 사이트를 따라서 샘플을 만들어 보았다.

그 결과 아주 간단하게 챗팅방이 완성되었다.



오페라의 문제인지 확실치는 않지만 이녀석은 메시지를 정상적으로 수신하지 못하는 경우도 있고.. 

메시지 수신도 다른 브라우저에 비하여 늦었다.(버전이 오래된건가 아니면 Polling 방식으로 데이터를 가져오다 먹어버린건지...)


TestSignalR.zip



node.js 에서 web socket 방식의 웹채팅을 본 이후에 웹에서도 간단히 채팅프로그램을 구현하겠구나 생각했는데.. 

MS 진영에서도 이렇게 쉽게 구현할 수 있는 방법을 제공한 다는 것에 호기심을 느끼고 한번 따라 만들어 보았다.

Posted by CoolDragon
2013. 11. 18. 18:00

웹소켓으로 실시간 처리를 할 수 있는 MS쪽 기술이라 하여 샘플을 실행해 보려 하였으나 

실패를 거듭하여 다른이들도 저와같은 동일한 고충을 겪을 사람들이 혹시나 있을까 싶어 정리를 해본다.


우선 VS2012를 가지고 있으면 매우 좋겠지만, 본인은 툴을 보유하고 있지 않은 관계로 VS2010으로 해보기로 결정하였다.

VS2010 환경에서 실행하려면 우선 SP1 를 설치해야 한다.


그 이후 패키지 관리자 콘솔에서 SignalR을 설치하려고 하니.. 잘 설치가 안된다..

그래서 이곳 저곳 헤맸더니 누군가가 답변을 실시간으로 주시더라는.. ㅋㅋ


[첫번째 주요링크]

http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/supported-platforms

[두번째 주요링크]

http://www.asp.net/signalr/overview/signalr-1x


SignalR버전에 따라서 사용가능한 환경이 정해져있나보다..

VS2010 버전에서는 Framework 4.5도 사용할 수도 없고 해서 아래와 같이 버전을 명시해서 다운로드 받아줘야 하나보다.

[.NET Framework 4.0 기반]

install-package Microsoft.AspNet.SignalR -Version 1.1.3


[.NET Framework 4.5 기반]

install-package Microsoft.AspNet.SignalR


이렇게하면 SignalR이 설치가 되어 기본적으로 개발을 진행할 수 있는 준비가 되었다고 할 수 있다.

Posted by CoolDragon
2013. 11. 1. 14:43
    public static class Base64String
    {
        public static string Base64Encode(this string src, System.Text.Encoding enc)
        {
            byte[] arr = enc.GetBytes(src);
            return Convert.ToBase64String(arr);
        }

        public static string Base64Decode(this string src, System.Text.Encoding enc)
        {
            byte[] arr = Convert.FromBase64String(src);
            return enc.GetString(arr);
        }
    }
Posted by CoolDragon
2013. 10. 31. 16:42

모듈 설치

npm install redis


소스

var _redis = require("redis");


var redis = _redis.createClient(포트, 아이피);


redis.get('키', function(error, result) {

    if (error) console.log('Error: '+ error);

    else console.log('Name: ' + result);

});


redis.set('키', Date(), function(error, result) {

    if (error) console.log('Error: ' + error);

    else console.log('Saved');

});


참조


Posted by CoolDragon