Skip to content

Instantly share code, notes, and snippets.

View shlee322's full-sized avatar
🍣
KRW -> FOOD

Vint Sanghyeok Lee shlee322

🍣
KRW -> FOOD
View GitHub Profile
@shlee322
shlee322 / saram.xml
Last active December 20, 2015 23:09
Saram을 이용하여 XML로 간단한 API 서버 구현
<?xml version="1.0" encoding="UTF-8"?>
<saram>
<database>
<node>mysql://test:testtest@localhost/test</node>
</database>
<module>
<module name='elab.user' mid='user' path='users'>
<module name='elab.keyvalue' mid='data' path='data'>
<config>
"name":"user_data",
@shlee322
shlee322 / gist:8156523
Last active January 1, 2016 14:19
[Mysql] places의 전체 레코드의 category (부모 category 포함) 조회방법

category

id name parent index
1 맛집 0 0
3 로컬정보 0 2
4 치킨 3 0
5 중식 3 1
6 피자/스파게티 3 2
@shlee322
shlee322 / check_password.js
Created February 17, 2015 04:28
개인정보의 기술적·관리적 보호조치 기준에 따른 비밀번호 작성 규칙 체크 함수
function check_password(pwd) {
// Copyright (c) 2015 Lee Sahghyuck <shlee322@elab.kr>
// MIT License (http://opensource.org/licenses/mit-license.php)
// Author : Lee Sahghyuck <shlee322@elab.kr>
// Date : 2015.02.17
var char_type = 0;
if (/[a-z]/.test(pwd)) char_type = char_type + 1;
if (/[A-Z]/.test(pwd)) char_type = char_type + 1;
if (/[0-9]/.test(pwd)) char_type = char_type + 1;
@shlee322
shlee322 / app.py
Created April 20, 2017 11:16
test
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
import boto3
client = boto3.client('sns',
aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
region_name='ap-northeast-1')
for phone in recipient_list:
client.publish(
PhoneNumber=phonenumbers.format_number(phone, phonenumbers.PhoneNumberFormat.E164),
Message=message,
)