Skip to content

Instantly share code, notes, and snippets.

View hatemogi's full-sized avatar
😃

Daehyun Kim hatemogi

😃
View GitHub Profile
@hatemogi
hatemogi / gist:2297829
Created April 4, 2012 04:34
OSX에서 tar 묶을때 ._등의 파일 제외하기
export COPYFILE_DISABLE=true
@hatemogi
hatemogi / gist:2297835
Created April 4, 2012 04:36
색상넣은 프롬프트
export PS1='\[\033[36m\]\u@\h:\w \$\[\033[0m\] '
export PS2='\[\033[32m\]\u@\h:\w \$\[\033[0m\] '
@hatemogi
hatemogi / account.rb
Created July 6, 2012 02:30
한글메소드명은 어색한가?
# 참가중인 프로젝트: 쓰기권한이 있는 프로젝트
def 참가프로젝트들
redis {|r| r.smembers @참가프로젝트키}
end
def 참가프로젝트_추가 project
redis {|r| r.sadd @참가프로젝트키, project.path}
end
def 참가프로젝트_제거 project
@hatemogi
hatemogi / gist:3127560
Created July 17, 2012 06:19
boot시 서비스 실행등록
sudo update-rc.d avahi-daemon defaults
@hatemogi
hatemogi / gist:4174795
Created November 30, 2012 09:40
openssl signing practice

기본아이디어

  • REST API를 이용하는데 있어서 표준 HTTPS인증방식을 사용하면 어떨까?
  • 서버 인증서도 발급해서 사용하고,
  • 클라이언트에게도 인증서를 발급해주어 인증에 사용.
  • 사설 CA를 사용해서 비용없이 처리가능

CA key/cert generation

  • openssl genrsa -des3 -out ca.key 4096
  • openssl req -new -x509 -days 365 -key ca.key -out ca.crt
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/nisboard
*secure.yml filter=crypt
begin
require 'wirble'
# init wirble
Wirble.init
Wirble.colorize
rescue LoadError => err
$stderr.puts "Couldn't load Wirble: #{err}"
end
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
# https://github.com/sstephenson/ruby-build/tree/master/share/ruby-build
# rbenv install 1.9.3-p374
# rbenv install jruby-1.7.3