Skip to content

Instantly share code, notes, and snippets.

View ujuc's full-sized avatar
๐ŸŽ—๏ธ
doing!

sungjin ujuc

๐ŸŽ—๏ธ
doing!
View GitHub Profile
@ujuc
ujuc / wsgi.py
Last active August 29, 2015 14:06
wsgi
import os
import sys
BASE_DIR = os.path.dirname((os.path.dirname(__file__)))
sys.path.append(BASE_DIR)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
@ujuc
ujuc / log_compress.py
Last active September 30, 2015 09:34
logfile ์••์ถ•
#!/usr/bin/env python
# coding: utf-8-
import os
import re
import sys
import tarfile as tar
LOG_PATH = sys.argv[1]
@ujuc
ujuc / fchost.conf
Last active August 29, 2015 14:28
zabbix FC host check
UserParameter=fchost.discovery, /etc/zabbix/fchost_discovery.py
UserParameter=fchost.status[*], /etc/zabbix/fchost_status.py $1
@ujuc
ujuc / ping_check.conf
Created August 25, 2015 14:33
Zabbix Ping check
UserParameter=ping_check[*], /etc/zabbix/ping_check.py $1
@ujuc
ujuc / bridge.conf
Created August 29, 2015 05:33
Zabbix bridge discovery.
UserParameter=bridge.discovery, /etc/zabbix/bridge_discovery.py
UserParameter=brdige.status[*], /etc/zabbix/bridge_status.py $1
@ujuc
ujuc / Dream.md
Last active September 17, 2015 09:21
ํ•˜๊ณ  ์‹ถ์€ ๊ฒƒ, ํ•˜๊ธฐ ์‹ซ์€ ๊ฒƒ

ํ•˜๊ณ  ์‹ถ์€๊ฒƒ

  1. ์ž„๋ฒ ๋””๋“œ
  • Todo
    1. ARM ์„œ๋ฒ„ ๋ชจ๋“ˆ ์„ค๊ณ„ ๋ฐ ๋“œ๋ผ์ด๋ฒ„ ๊ฐœ๋ฐœ
    2. CPU ๋ชจ๋“ˆ๋กœ ์žฅ๋‚œ๊ฐ ์ œ์ž‘
  • Doing?
    • ์ทจ๋ฏธ... ํ™œ๋™์œผ๋กœ ๋นผ์ž...
  1. OpenStack
  • Todo
  1. Python ๊ฐœ๋ฐœ
@ujuc
ujuc / glance_image_down.py
Last active September 23, 2015 09:31
Glance image download
#!/usr/bin/env python
# coding: utf-8
"""
Glance Image ๋ฆฌ์ŠคํŠธ๋ฅผ ํŒŒ์ผ๋กœ ๋งŒ๋“  ๋‹ค์Œ ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰ํ•˜๋„๋กํ•˜์ž.
์ด๋ฏธ์ง€์ค‘ ํ•„์š”์—†๋Š” ๊ฒƒ๋“ค์— ๋Œ€ํ•ด์„œ๋Š” ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰ ์ „์— ๋กœ๊ทธ์—์„œ ์‚ญ์ œํ•˜๋„๋กํ•œ๋‹ค.
"""
import sys
import subprocess as sub
@ujuc
ujuc / rbenv-install-system-wide.sh
Last active November 10, 2015 05:19 — forked from jnx/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
#apt-get update
#apt-get -y upgrade
#apt-get -y install build-essential
#apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/2.3/services/IOTDEMO/package/scripts/master.py", line 132, in <module>
Master().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/var/lib/ambari-agent/cache/stacks/HDP/2.3/services/IOTDEMO/package/scripts/master.py", line 43, in install
Execute ('cd ' + params.install_dir +'; git clone https://github.com/hortonworks/sedev >> '+params.stack_log)
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run
@ujuc
ujuc / ddns.py
Created May 10, 2016 05:56 — forked from allieus/ddns.py
Route 53 ์— ๋‚ด ๋„๋ฉ”์ธ ์ •๋ณด ๋ฐ˜์˜ํ•˜๊ธฐ (Dynamic DNS ๋กœ ํ™œ์šฉํ•˜๊ธฐ)
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from boto.route53 import connect_to_region
from boto.route53.record import ResourceRecordSets
def apply(domain, ip, ttl, region, access_key=None, secret_key=None):
if access_key:
os.environ.setdefault('AWS_ACCESS_KEY_ID', access_key)