This file contains 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
brew install postgresql |
This file contains 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
function doCurl(){ | |
// SUUMOのURL | |
var url = "https://suumo.jp/chintai/bc_100106732165/?suit=STfr20160902000" | |
main(url) | |
} | |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// main: | |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
function main(url){ |
This file contains 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
function doGet(e) { | |
// listデータをjsonに変換 | |
payload = JSON.stringify(get_kakeibo()) | |
// payloadをreturnするだけではだめ | |
// ContentServiceを利用して、responseを作成 | |
ContentService.createTextOutput() | |
var output = ContentService.createTextOutput(); | |
output.setMimeType(ContentService.MimeType.JSON); | |
output.setContent(payload); | |
// return response-data |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>hello</title> | |
</head> | |
<body> | |
<img src="/gas/charts/simple2.png" alt=""> | |
</body> | |
</html> |
This file contains 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
function doPost(e) { | |
// token確認 | |
var verify_token = LogGasApp.token_learning; | |
if (verify_token != e.parameter.token || e.parameter.user_name=="slackbot") { | |
throw new Error("invalid token."); | |
} | |
// check trigger_word | |
var trword = e.parameter.trigger_word; |
This file contains 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
//======================================================= | |
// doPost: Slack-GASのGateway | |
//======================================================= | |
function doPost(e) { | |
var verify_token ="TOKEN"; //outgoing-webhooks | |
var contents=e.postData.contents; | |
var channelID = "#"+e.parameter.channel_name; | |
var word = e.parameter.trigger_word; | |
var message = ""; |
This file contains 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
function doPost (e) { | |
// << PostData の処理 >> | |
var org_post = e.postData.contents; | |
var contents = JSON.parse(org_post); | |
var knowledge = contents; | |
var sheet = sheet_knowledge; | |
// << 分岐 >> | |
// <1.comment> |