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
- (IBAction)startInstance:(id)sender { | |
LAContext *myContext = [[LAContext alloc] init]; | |
NSError *error = nil; | |
// 端末が指紋認証を使えるかどうか判定 | |
if([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) { | |
NSString *myLocalizedReasonString = @"指紋認証せんかい!"; | |
[self.activityIndicator startAnimating]; | |
// 指紋認証画面を表示 | |
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics |
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 AWS = require('aws-sdk'); | |
function ISODateString(d){ | |
function pad(n){return n<10 ? '0'+n : n} | |
return d.getUTCFullYear()+'-' | |
+ pad(d.getUTCMonth()+1)+'-' | |
+ pad(d.getUTCDate())+'T' | |
+ pad(d.getUTCHours())+':' | |
+ pad(d.getUTCMinutes())+':' | |
+ pad(d.getUTCSeconds())+'Z' |
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 AWS = require('aws-sdk'); | |
function startInstance(instance_id, context) { | |
var ec2 = new AWS.EC2(); | |
var params = { | |
InstanceIds: [ | |
instance_id | |
] | |
}; |
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
<?php | |
add_action( 'wpmu_new_blog', function($blog_id) { | |
//マルチサイトの親のお問い合わせデータを取ってくる | |
switch_to_blog(1); | |
$trust_form = get_posts( array('post_type'=>'trust-form') ); | |
if ( empty($trust_form) ) { | |
return; | |
} |
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
<?php | |
require_once("vendor/autoload.php"); | |
use Aws\CognitoIdentity\CognitoIdentityClient; | |
use Aws\Sts\StsClient; | |
use Aws\S3\S3Client; | |
$facebook = new Facebook(array( | |
'appId' => '<facebookのappid>', | |
'secret' => '<facebookのsecret>', | |
)); |
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
<?php | |
require_once("vendor/autoload.php"); | |
Use Aws\MachineLearning\MachineLearningClient; | |
$hash_value = mt_rand(); | |
$client = MachineLearningClient::factory(array('version'=>'2014-12-12','region'=>'us-east-1')); | |
//訓練データ定義 |
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 aws = require('aws-sdk'); | |
var machinelearning = new aws.MachineLearning(); | |
var params = { | |
MLModelId: '<Machine LearningのモデルID>' | |
}; | |
exports.handler = function(event, context) { | |
machinelearning.getMLModel(params, function(err, data) { | |
if (err) { | |
console.log(err, err.stack); |
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 aws = require('aws-sdk'); | |
var cloudsearchdomain = new aws.CloudSearchDomain({ | |
endpoint: '<CloudSearchのエンドポイント>' | |
}); | |
exports.handler = function(event, context) { | |
var params = { | |
query:event.q | |
}; |
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 webdriver = require('selenium-webdriver'); | |
var t = require('selenium-webdriver/testing'); | |
var driver; | |
var By = webdriver.By; | |
var until = require('selenium-webdriver').until; | |
var setting = require('./setting.json'); | |
var fs = require('fs'); | |
var expect = require('expect.js'); | |
var timestamp = Math.floor( new Date().getTime() / 1000 ); |
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
{ | |
"login": { | |
"url":"http://wordpress.local/wp-login.php", | |
"account_id":"admin", | |
"account_pass":"admin" | |
} | |
} |