st=>start: Start
e=>end
op=>operation: My Operation
cond=>condition: Yes or No?
st->op->cond
cond(yes)->e
cond(no)->op
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
function onRequest(request, response) { | |
console.log('request received.'); | |
response.writeHead(200, {'Content-Type' : 'text/plain'}); | |
response.write('Hello World'); | |
response.end(); | |
} | |
http.createServer(onRequest).listen(8888); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 해당하는 팀과의 소켓을 연결함 | |
def open_socket(teamId, data): | |
redis_manager.redis_client.hset('rtm_status_'+teamId, 'status', SOCKET_STATUS_CONNECTING) | |
redis_manager.redis_client.hset('rtm_status_'+teamId, 'expire_time', time.time() + SOCKET_EXPIRE_TIME) | |
result = db_manager.query( | |
"SELECT team_bot_access_token " | |
"FROM TEAM " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colors for the prompt | |
blue="\033[0;34m" | |
white="\033[0;37m" | |
green="\033[0;32m" | |
magenta="\033[0;55m" | |
# Brackets needed around non-printable characters in PS1 | |
ps1_blue='\['"$blue"'\]' | |
ps1_green='\['"$green"'\]' | |
ps1_white='\['"$white"'\]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import sys | |
SLACK_API_SERVER = "https://slack.com/api/" | |
class SlackApi: | |
def __init__(self, token): | |
self.token = token |
https://api.slack.com/apps?new_app=1 에서 새로운 앱 생성
Basic Information 탭에서 ClientID와 Client Secret 메모
NewerOlder