2015. 8. 27. 07:00

#Download Vagrant latest version(2015.08.26)

$ wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.deb


# Install Vagrant

$ sudo dpkg -i vagrant_1.7.4_x86_64.deb


#version check

$ vagrant --version

Vagrant 1.7.4


#VirtualBox install

$ sudo apt-get install virtualbox


# Install ubuntu 14.04 on Virtualbox using vagrant

You can find vagrant box on the following: http://www.vagrantbox.es/

ex) $ vagrant box add {title} {url}


$ vagrant box add ubuntu14.04 https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box


# After initialization, Vagrantfile is created and the information in the file configuration can set up OS automatically

$ vagrant init ubuntu14.04


# Execute OS

$ vagrant up


# Shutdown OS

$ vagrant halt or vagrant suspend


# Delete OS

$ vagrant destroy


# Apply provisioning

$ vagrant provision


# Access server

$ vagrant ssh


# Setting Vagrant provisioning





Posted by CoolDragon
2015. 7. 25. 17:20

1) 개요

mvc를 지원하는 front-end 자바스크립트 프레임워크


2) 다운로드

https://angularjs.org/


3) 플렁커

plnkr.co

angular.js 를 이용하여 작성된 스크립트를 쉽게 UI와 함께 테스트를 해볼 있는 사이트 이다.


4) 기타

https://angular.io

http://courseware.codeschool.com/shaping-up-with-angular-js/Slides/level01-05.pdf

위의 PDF 문서에서 angularjs 가 지원하는 모든(?) 기능을 훑어볼 수 있다.

Posted by CoolDragon
2015. 7. 18. 05:50

1. install NPM

> sudo apt-get install npm

> sudo npm update -g npm


2.install CLI

> sudo npm install -g grunt-cli


3. Create Gruntfile

> npm init # 명령어 실행 후 "package.json" 파일이 생성되고 "name" : "프로젝트명"이  "grunt"일 경우 다른 프로젝트명으로 변경한다.

> npm install grunt --save-dev

npm install grunt-contrib-concat --save-dev # concat 플러그인 설치 (여러 파일을 하나의 파일로 만들어준다)

> npm install grunt-contrib-watch --save-dev # watch 플러그인 설치(설정된 파일을 모니터링하여 변경사항이 있으면 바로 적용시켜준다)

> touch gruntfile.js

Grunt 주요 플러그인

  - uglify : JS 파일 병합 및 압축

  - concat : JS 파일 병합 

  - less, sass : less 또는 sass 파일을 css로 변환(?)

  - cssmin : css 파일 압축

  - imagemin : 이미지 파일 사이즈 감소


4. gruntfile.js Setting

module. exports = function(grunt) {


grunt.initConfig({

  concat: {

    js: {

      src: ['script/js1.js', 'script/js2.js', 'script/js3.js'],

      dest: 'dist/js/built.js',

    },

    css: {

      src: ['css/intro.js', 'css/project.js', 'css/outro.js'],

      dest: 'dist/css/built.js',

    },

  },

  watch: {

    scripts: {

      files: ['script/**/*.js'],

      tasks: ['concat:js'],

    },

    css: {

      files: ['css/**/*.css'],

      tasks: ['concat:css'],

    },

  },

});


grunt.loadNpmTasks('grunt-contrib-concat');

grunt.loadNpmTasks('grunt-contrib-watch');


grunt.registerTask('default', ['concat', 'watch']);

}


5. Execute

> grunt {TaskName}

> grunt

grunt.registerTask()의 첫번째 인자에 'default'로 지정하면 grunt 명령어 실행시 옵션 없이 두번째 인자 배열안의 항목들을 실행할 수 있다.

Posted by CoolDragon
2015. 7. 18. 04:09

git status

git add <filename.확장자>

git rm <filename.확장자>

git commit -m "내용"



git checkout -b <branch name> -- create branch

git checkout <branch name> -- move to branch


git branch -- shows branch list and current using branch

git branch -m <branch name> <new branch name>  -- change branch name

git branch -d <branch name> -- delete branch


 

git push origin master

  - git remote add origin <원격서버주소>

git pull origin master

 

 

gitk& -- see commit history

git merge --no-ff <branch name A> -- for example, while using B branch, A branch applies new changes to B

 

c:> git checkout -p <branch name A> somecode.js -- only one file merge from branch name A to B

출처: <http://stackoverflow.com/questions/13711455/how-can-i-merge-a-specific-file-from-one-branch-into-another-branch-in-git>


Posted by CoolDragon
2015. 7. 17. 05:55

1) 다운로드

  이 경로에서 설치하려는 OS 에 맞는 버전을 다운로드 받는다. https://www.apachefriends.org/download.html

  나는 우분투에 설치를 하고자 "xampp-linux-x64-5.6.8-0-installer.run" 버전을 선택하였다.


2) 권한부여

  다운로드 받은 파일을 해당 서버로 복사하고 파일을 실행하기 위한 권한을 부여한다.

$ wget https://www.apachefriends.org/xampp-files/5.6.8/xampp-linux-x64-5.6.8-0-installer.run

$ sudo chmod +x xampp-linux-x64-5.6.8-0-installer.run

  wget을 통하여 파일을 다운로드 받거나 파일을 다운로드 받고  scp 명령어과 같은 방법을 통하여 서버로 복사를 할 수 있다.

3) 설치

$ sudo ./xampp-linux-x64-5.6.8-0-installer.run

  설치과정에 물어보는 것이 많은데 모두  Y 를 누르면 설치가 완료될 것이다. 완료 후 /opt/ 하위 경로에 lampp 디렉토리가 추가되어있는 것을 확인할 수 있다.


4) XAMPP 실행/중지/재시작

$ sudo /opt/lampp/lampp start

$ sudo /opt/lampp/lampp stop

$ sudo /opt/lampp/lampp restart


5) 테스트

  로컬에서만 설치여부를 확인하고자 할 경우에는 특별히 문제가 없다. 다만 다른 PC에서 XAMPP를 열고자 할 경우에는 접근권한이 없다.

  이럴 경우 반드시 방화벽의 80 포트가 열려있는지 확인하고 "/opt/lampp/etc/extra/httpd-xampp.conf" 파일에서 아래처럼 수정해주어야 한다.

sudo vi /opt/lampp/etc/extra/httpd-xampp.conf

...

<LocationMatch ...>

# Require local

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

</LocationMatch>

이제 리모트에서도 브라우저로 페이지를 열수가 있다. (http://192.168.xxx.xxx/xampp)



참조) http://www.unixmen.com/how-to-install-xampp-stack-on-ubuntu-15-04/

Posted by CoolDragon
2015. 7. 17. 05:39

SCP

> scp source_file_nam username@destination_host:destination_folder

example)

scp Download/A.txt cooldragon@192.168.56.10:/home/cooldragon


SFTP

Posted by CoolDragon
2015. 7. 17. 04:47

1. firewall (refer to https://help.ubuntu.com/lts/serverguide/firewall.html)

   > sudo ufw enable

   > sudo ufw allow 22


2. netstat

   > sudo netstat -plant | grep ssh


3. install ssh (http://cooldragon.tistory.com/139)

  > sudo apt-get install openssh-server


connection test from other terminal)

> ssh account@IP

> ssh cooldragon@192.168.56.102

Posted by CoolDragon
2015. 7. 2. 02:29
Posted by CoolDragon
2015. 6. 10. 03:39

Download the following Nuget Packages

  • xUnit.net
  • xUnix.net [Runner: Visual Studio]
  • AutoFixture
  • AutoFixture with xUnix.net data theories
  • Moq

Main Class and Interface
  • AutoFixture
  • var fixture = new Fixture();
  • Create<T>()
  • CreateMany<T>()
  • AddManyTo()
  • Inject()
  • Build<>()
  • With(), Without()
  • Do()
  • OmitAutoProperties()
  • Customizations.Add(ISpecimenBuilder inherited object)
  • ISpecimenBuilder



Posted by CoolDragon
2015. 4. 22. 11:52

windows server 2003

c:/> wuauclt /detectnow /reportnow


above windows server 2008 

c:/> wuapp

Posted by CoolDragon