Skip to content

Instantly share code, notes, and snippets.

View hunnycode's full-sized avatar

joohoun song hunnycode

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say language="ja-jp">こんにちは</Say>
</Response>
<?php
$numbers = array("<number to call n>", "<number to call n>", "<number to call n>");
$number_index = isset($_REQUEST['number_index']) ? $_REQUEST['number_index'] : "0";
$DialCallStatus = isset($_POST['DialCallStatus']) ? $_POST['DialCallStatus'] : "";
header("content-type: text/xml");
if($DialCallStatus!="completed" && $number_index == 2){
$number_index = 0;
}
@hunnycode
hunnycode / CreateTable
Last active May 13, 2016 09:27
【ハンズオン】Node-RED入門編 ref: http://qiita.com/joohounsong/items/5b5241df84f910df6627
CREATE TABLE "TWEETS"
(
"TWEETID" VARCHAR(50),
"SENTIMENT" INT
);
@hunnycode
hunnycode / hello.js
Last active May 11, 2016 05:12
【ハンズオン資料】IBM Bluemix OpenWhisk もくもく会 ref: http://qiita.com/joohounsong/items/ba4657549138b2fc47ba
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
<?php
$to = $_POST['email'];
$from = "送信元メールアドレス";
$subject = $_POST['subject'];
$body = $_POST['body'];
$url = 'https://api.sendgrid.com/';
$user = 'SendGrid username';
$pass = 'SendGrid Password';
<!DOCTYPE html>
<html>
<head>
<title>PHP Starter Application</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css" />
</head>
<body>
<table>
<tr>
<?php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library
// Substitute the following values using the details from your Twilio Account
$accountSid = ACCOUNT_SID;
$apiKeySid = API_KEY_SID;
$apiKeySecret = API_KEY_SECRET;
$configurationProfileSid = CONFIGURATION_PROFILE_SID;
// Create an Access Token
@hunnycode
hunnycode / ターミナル:Arc起動
Last active December 20, 2015 17:30
StrongLoop Arcを使った、GUIによるDBのAPI化。 ref: http://qiita.com/joohounsong/items/840d930a117e35ae40b9
slc arc
@hunnycode
hunnycode / Bluemixにデプロイ
Last active December 18, 2015 17:57
【ハンズオン資料】StrongLoopのLoopBackを使ってBluemix上のdatabaseをAPIで操作(CRUD) ref: http://qiita.com/joohounsong/items/476bf95016a2266d0da8
cf api https://api.ng.bluemix.net
cf login -u <user_name> -o <organization> -s <space>
cf push joohoun-loopback
@hunnycode
hunnycode / Bluemixにログイン
Last active December 6, 2015 16:45
BluemixとSendGridを使って、メール送信アプリを作ってみた。 ref: http://qiita.com/joohounsong/items/96dfb8f5099e581f5a44
cf login -u [Bluemix Login Mail Add] -s [Bluemix Space]