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
const exec = require('child_process').exec; | |
exports.handler = (event, context, callback) => { | |
// TODO implement | |
//callback(null, 'Hello from Lambda'); | |
let cmd = 'curl -X GET "https://subdomain.cybozu.com/k/v1/records.json?app=308" -H "X-Cybozu-API-Token: xxxx"'; | |
cmd = event.cmd || process.env.cmd || cmd; | |
exec(cmd, (err, stdout, stderr) => { | |
if (err) { | |
console.log(err); |
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
/* | |
* global.$ | |
* global._ | |
*/ | |
jQuery.noConflict(); | |
(function ($) { | |
'use strict'; | |
kintone.events.on(['app.record.index.show'], function (event) { |
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
/* | |
* global.$ | |
*/ | |
jQuery.noConflict(); | |
(function ($) { | |
'use strict'; | |
kintone.events.on(['app.record.index.show'], function (event) { | |
// 値をヘッダにappendするテキストボックス生成 |
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
/* | |
* global.$ | |
*/ | |
jQuery.noConflict(); | |
(function ($) { | |
'use strict'; | |
kintone.events.on(['app.record.index.show'], function (event) { | |
// レコードのフィールド値からセレクトボックス生成 |
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
/* | |
* global.$ | |
*/ | |
jQuery.noConflict(); | |
(function ($) { | |
'use strict'; | |
kintone.events.on(['app.record.index.show'], function (event) { | |
// フィールド情報からセレクトボックスを生成 |
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
var url = kintone.api.url('/k/v1/records', true) + '?app=' + kintone.app.getId(); | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', url); | |
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); | |
xhr.onload = function () { | |
if (xhr.status === 200) { | |
// success | |
console.log(JSON.parse(xhr.responseText)); | |
} else { |
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
{ | |
/* | |
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ |
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 runBalus(intent, session, callback) { | |
console.log('start "run Balus"'); | |
var cardTitle = intent.name; | |
var favoriteColorSlot = intent.slots.Color; | |
var repromptText = "Run Balus. I'll delete all kintone records."; | |
var sessionAttributes = {}; | |
var shouldEndSession = true; | |
var speechOutput = "Run Balus. I'll delete all kintone records."; |
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
var awsIot = require('aws-iot-device-sdk'); // AWS IoT SDK | |
var moment = require('moment'); // Date library // moment | |
var exec = require('child_process').exec; | |
// constant parameters | |
const DEVICE_NAME = 'dev1'; | |
const TOPIC = "raspi/temp"; // MQTT TOPIC | |
const REGION = 'ap-northeast-1'; | |
// device config. |
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
{ | |
"app": 19, | |
"scope": "ALL", | |
"desktop": { | |
"js": [{ | |
"type": "URL", | |
"url": "https://js.cybozu.com/jquery/1.11.3/jquery.min.js" | |
}, { | |
"type": "URL", | |
"url": "https://js.cybozu.com/jqueryui/1.11.4/jquery-ui.min.js" |
NewerOlder