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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"Service": [ | |
"events.amazonaws.com", | |
"ec2.amazonaws.com" | |
] |
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
{ | |
"ExportJobResponse": { | |
"CreationDate": "2020-07-04T06:21:41.606Z", | |
"Definition": { | |
"RoleArn": "arn:aws:iam::999999999999:role/s3ExportRole", | |
"S3UrlPrefix": "s3://バケット名/Exports/" | |
}, | |
"Id": "22d2e2f2452d4645558111333ada506c", | |
"JobStatus": "CREATED", | |
"Type": "EXPORT" |
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
{ | |
"Version":"2012-10-17", | |
"Statement":[ | |
{ | |
"Effect":"Allow", | |
"Principal":{ | |
"Service":"pinpoint.amazonaws.com" | |
}, | |
"Action":"sts:AssumeRole" | |
} |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowUserToSeeBucketListInTheConsole", | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:GetBucketLocation" | |
], | |
"Effect": "Allow", |
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 str = "/var/db/hoge/test1/Android.json"; | |
let regexp = /\/var\/db\/hoge\/(.*?)\/(iPhone|Android)\.json/g; | |
console.log(regexp.test(str)) // true | |
console.log(regexp.exec(str)) // nullになってしまう |
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
PUT http://localhost:8080/hoge-0.0.1-SNAPSHOT/employees/12345 | |
Content-Type: application/json | |
{ | |
"id": "12345", | |
"name": "takahashi" | |
} |
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
package jp.co.confrage; | |
import org.springframework.boot.builder.SpringApplicationBuilder; | |
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | |
public class ServletInitializer extends SpringBootServletInitializer { | |
@Override | |
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
return application.sources(WarApplication.class); | |
} |
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
$response = new Phalcon\Http\Response(); | |
// $recordがexecuteQueryメソッドの戻り値 | |
if ($record === false) { | |
$response->setStatusCode(404); | |
$response->setJsonContent( | |
[ | |
'status' => 'NOT-FOUND' | |
] | |
); | |
} 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
<?php | |
declare(strict_types=1); | |
error_reporting(E_ALL); | |
// オートローダー設定 | |
$loader = new Phalcon\Loader(); | |
$loader->registerNamespaces( | |
[ | |
'App\Models' => __DIR__ . '/models/', | |
] |
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 () use ($app) { | |
$body = $app->request->getJsonRawBody(); // リクエストボディを受け取る | |
$status = $app | |
->modelsManager | |
->executeQuery( | |
'INSERT INTO App\Models\Empuser (id, firstname, lastname, age) VALUES ' . | |
'(:id:, :firstname:, :lastname:, :age:) ', | |
[ | |
'id' => $body->id, | |
'firstname' => $body->firstname, |