나도 iPhone구매, 그리고 코딩하고 싶다.

1. 내 pc에 cygwin 설치하기

2. objective-c 컴파일러 설치하기

3. cygwin 한글

3. cygwin 으로 내 pc에 ftp server 설치하기 (이건 회사에서 사용하려고..)

4. ToolChain 설치하기

5. 그리고~


위 글을 쓰고 한참 있다가 방법을 바꿨다. :)

6. GNUstep을 설치한다.

    gnustep 윈도우용은 한번에 설치된다.


그리고,  iphone프로그래밍은 역시 mac에서 할 수 밖에 없을 것 같다는생각에

방법을 바궜다. ==> iphone programming 시작은 이렇게

Posted by stekilove
,
참고 URL: ProFTPD-mini-HOWTO-Limit

권한관련 상세 : http://asone.tistory.com/188
                      ProFTPD-mini-HOWTO-ListOptions


1. cygwin 은 C:\cygwin 에 철치됨
2. proftpd 설치
3. 우선 cygwin 경로에서 벗어 나 있는 것을 마운트 하고
    mount -f d:\\ /home/Guest
4. /etc/proftpd.con 수정

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName            "ProFTPD Default Installation"
ServerType            standalone
DefaultServer            on

# Port 21 is the standard FTP port.
Port                21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances            30

# Set the user and group under which the server will run.
User                Standard
#User                SYSTEM
#Group                Administrators

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite        on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous ~Guest>

  # Allow logins if they are disabled above.
  <Limit LOGIN>
    AllowAll
  </Limit>

  # Limit the maximum number of anonymous logins
  MaxClients            10 "Sorry, max %m users -- try again later"


  User                Guest
  #Group                ftp

  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias            anonymous Guest

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin            welcome.msg
  DisplayFirstChdir        .message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
    DenyAll
  </Limit>

  <Directory /home/Guest/uploads>
    #<Limit ALL>
    #  DenyAll
    #</Limit>

    <Limit CDUP CWD XCWD XCUP DELE>
      AllowAll
    </Limit>

    <Limit STOR STOU>
      AllowAll
    </Limit>
  </Directory>


  <Directory /home/Guest/scheduler>
    <Limit LIST NLST>
      DenyAll
    </Limit>
  </Directory>

</Anonymous>

Posted by stekilove
,

cygwin 한글

computer programming 2009. 12. 22. 16:52

Cygwin 기본설정 상태에서는 한글입출력이 불가능 합니다.
몇가지 환경설정을 해줘야 한글 입출력이 가능해 집니다.

자신의 홈 디렉토리의
.inputrc 파일을 생성하여 다음의 내용을 추가하여 줍니다.

set meta-flag on
set convert-meta off
set output-meta on



마찬가지로 홈 디렉토리의
.bashrc 파일을 생성하여 다음의 내용을 추가하여 줍니다.

alias ls='ls -F --color=auto --show-control-char'
alias l.='ls -dl .[a-zA-Z]*'
alias ll='ls -al'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'



마지막으로 .bash_profile 맨 마지막에


if [ -f /etc/bash.bashrc ] ; then
source /etc/bash.bashrc
fi

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

를 추가해줍니다.


출처: http://nowdac.com/2460697

Posted by stekilove
,
((totalSum=0))
((iCount=0))
for fileName in `ls *.txt`
do
  if [ ! -e "$fileName" ]
  then
    echo "$fileName is not exists"
    continue
  fi

  strLineCount=$(wc -l ${fileName} | awk '{print $1}')
  #strLineCount=$(cat $fileName | wc -l)
  echo "$fileName [$strLineCount]"

  ((totalSum=totalSum+strLineCount))
done

echo $totalSum
Posted by stekilove
,
  <script>

    var arr = new Array();
    arr.push("22");
    arr.push("21");
    arr.push("");
    arr.push("23");
    arr.push("32");
    arr.push("15");
    arr.push("33");
    arr.push("3");
    arr.push("2");

    for( var key in arr ){
        var v= arr[key];
        if( v.match("22|23|33|32") ){
            document.writeln( v );
            document.writeln("<hr>");
        }
    }
  </script>

결과:
22
23
43
33
Posted by stekilove
,
b=$({
      echo "1 what"
      echo "2 the"
      echo "3 hell"
      echo "4 are"
      echo "5 you"
      echo "6 doing"
    } \
    | grep "^[235]"  \              # 정규표현식 2,3,5로 시작하는 라인
    | sed 's/[0-9\s]*//' \     # 숫자와 공백으로 연결된 문자열을 지운다
)

echo ${b}

결과:
the hell you

Posted by stekilove
,
#!/bin/sh

aaa(){
  len="${#@}"
  ((s=0))
  for i in ${@}
  do
    ((s+=$i))
  done
  echo $s
}

a=$(aaa 1 2 3 4 5)
((b=$(aaa 1 2 3 4 5)+1))
((c=a+1))
d=a+1


echo ">> $a <<"
echo ">> $b <<"
echo ">> $c <<"
echo ">> $d <<"


결과
>> 15 <<
>> 16 <<
>> 16 <<
>> a+1 <<

Posted by stekilove
,
s=0; (1..100).each{|a| s+=a }; print s

설명:
  1. s=0 으로 선언한다.
  2. 1~100 까지 돌면서 s에 더한다.
  3. s를 출력한다.

결과:
  5050



Posted by stekilove
,
(img1.src < img2.src)

-- 문자열 정렬
var list = new Array();
list.push("a");
list.push("b");
list.push("t");
list.push("c");

list.sort( function( a, b, ){  return (a>b)-(a<b); } ); // ascending sort
a b c t
list.sort( function( a, b, ){  return (a<b)-(a>b); } ); // descending sort
t c b a

숫자정렬은
  function( a, b, ) { return a-b; } 이런식으로 하면 된다. ^^
Posted by stekilove
,
reference-site: http://www.quirksmode.org/js/events_mouse.html


element.onmousemove = doSomething;

function doSomething(e) {
if (!e) var e = window.event;
var tg = (window.event) ? e.srcElement : e.target;
if (tg.nodeName != 'DIV') return;
var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement; //
while (reltg != tg && reltg.nodeName != 'BODY')
reltg= reltg.parentNode
if (reltg== tg) return;
}



function doSomething(e) {
if (!e) var e = window.event;
var relTarg = e.relatedTarget || e.fromElement;
}
function doSomething(e) {
if (!e) var e = window.event;
var relTarg = e.relatedTarget || e.toElement;
}


Posted by stekilove
,