Skip to content

Instantly share code, notes, and snippets.

View kkd927's full-sized avatar
🇰🇷

KyoungDeok Kwon kkd927

🇰🇷
View GitHub Profile
@kkd927
kkd927 / local.conf
Created May 5, 2014 10:18
DevStack local.conf for OpenStack IceHouse
[[local|localrc]]
DEST=/opt
# If git protocol is blocked in your testing environment
# GIT_BASE=${GIT_BASE:-https://git.openstack.org}
# Credentials
DATABASE_PASSWORD=openstack
@kkd927
kkd927 / gist:80c09f5669ac69679131
Created June 6, 2014 12:52
Code to erase blank before and after string in C/C++
char * space_remove(char *str)
{
// change BUF_SIZE depending on the length of your string
char buf[BUF_SIZE]={0,};
char *p;
p = strtok(str, "\r\n\t ");
strcat(buf, p);
while(p!=NULL){
p = strtok(NULL, "\r\n\t ");
if(p!=NULL) {
@kkd927
kkd927 / gist:0f8fb8175b9c12c47f96
Last active August 29, 2015 14:03
Linux Port Forwarding
sudo iptables -t nat -A PREROUTING -p tcp -d your_ip_address --dport 80 -j REDIRECT --to-port 3000
@kkd927
kkd927 / gist:041c356b10374071daf7
Last active August 29, 2015 14:04
how to install python 2.7 on CentOS 5.x
# 필요 패키지들 설치
yum -y groupinstall 'Development Tools'
yum -y install openssl-devel* ncurses-devel* zlib*.x86_64
yum -y install bzip2 bzip2-devel bzip2-libs
@kkd927
kkd927 / gist:1feb40b3a279c156e14e
Last active August 29, 2015 14:04
how to install python-setuptools & pip on centos5.x (python2.7)
# 1. pip 설치를 위한 python-setuptools 다운
wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
# 2. pip 설치를 위한 python-setuptools 설치
sh setuptools-0.6c11-py2.7.egg
@kkd927
kkd927 / gist:20c0939a6330cc0769e2
Last active August 29, 2015 14:04
How to install JDK 6 using wget/curl (CLI)
# 1. Download JDK 6 using wget/curl (cli)
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
# 2. Change mode to excute
chmod +x jdk-6u45-linux-x64.bin
@kkd927
kkd927 / gist:cb2d27751d5721356963
Last active August 29, 2015 14:04
How to download and install torque-3.0.5
# http://www.itstory.tk/88
# [Head & Compute Node]
# 1. Download torque-3.0.5.tar.gz with wget
$ wget -O torque-3.0.5.tar.gz "http://wpfilebase.s3.amazonaws.com/torque/snapshots/torque-3.0.5-snap.201203201448.tar.gz?AWSAccessKeyId=AKIAJN2PZU37BETGCSOQ&Expires=1429823823&Signature=WWw28UBfaJeR6tB5Nekcm49htKQ%3D"
# 2. Unzip torque-3.0.5.tar.gz
$ tar zxvf torque-3.0.5.tar.gz
# 3. Configure torque with appropriate options
@kkd927
kkd927 / gist:9d30d7500950197db652
Created August 7, 2014 04:23
How to install ansible on control node
# view all ansible installation guide -- http://www.itstory.tk/89
git clone git://github.com/ansible/ansible.git
cd ./ansible
source ./hacking/env-setup
pip install paramiko PyYAML jinja2 httplib2
<script type="text/javascript" src="http://apis.daum.net/maps/maps3.js?apikey=DAUM_MAPS_DEMO_APIKEY" charset="utf-8"></script>
<script type="text/javascript">
var map;
$( function init() {
map = new daum.maps.Map(document.getElementById('map'), {
center: new daum.maps.LatLng(37.537123, 127.005523),
level: 3
@kkd927
kkd927 / gist:565082982caf2caf91a2
Created August 8, 2014 07:18
[다음지도 API] 지도 컨트롤 올리기
<script type="text/javascript" src="http://apis.daum.net/maps/maps3.js?apikey=DAUM_MAPS_DEMO_APIKEY" charset="utf-8"></script>
<script type="text/javascript">
var map;
$(function init() {
map = new daum.maps.Map(document.getElementById('map'), {
center: new daum.maps.LatLng(37.537123, 127.005523)
});
var zoomControl = new daum.maps.ZoomControl(); # Creat Zoom Control
map.addControl(zoomControl, daum.maps.ControlPosition.RIGHT); # Add Zoom Control
var mapTypeControl = new daum.maps.MapTypeControl(); # Create Map Type Control