Skip to content

Instantly share code, notes, and snippets.

View howyi's full-sized avatar
🐔

niwatori / Hayashi Takuya howyi

🐔
View GitHub Profile
@howyi
howyi / 2.php
Created January 15, 2020 16:44
<?php
/**
* @return string
*/
public function getDefault(): string
{
return $this->default;
}
@howyi
howyi / 1.php
Created January 15, 2020 16:44
<?php
/**
* @return string
*/
public function getDefault(): string
{
if (is_numeric($this->default)) {
return $this->default;
} elseif (strtoupper($this->type) === 'TIMESTAMP' and $this->default = 'CURRENT_TIMESTAMP') {
return $this->default;
## [Start] Inject @versioned condition.. **
#set( $versionedCondition = {
"expression": "#version = :expectedVersion",
"expressionValues": {
":expectedVersion": $util.dynamodb.toDynamoDB($ctx.args.input.expectedVersion)
},
"expressionNames": {
"#version": "version"
}
} )
@howyi
howyi / post.json
Last active December 2, 2019 16:56
{
"id": "7d89e225-7659-4bb4-816a-f23c659c8d0c",
"title": "こんにちは",
"version": 1
}
type Post @model @versioned {
id: ID!
title: String!
}
@howyi
howyi / config.yml
Last active November 12, 2019 16:54
# https://Dependabot.com/docs/config-file/
version: 1
update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "daily"
automerged_updates:
- match:
# devDependenciesのパッケージの更新はすべて自動でマージ
dependency_type: "development"
<?php
return (strpos($this->app->version(),'Lumen') !== false);
<?php
use Illuminate\Support\Str;
return Str::contains($this->app->version(), 'Lumen');
<?php
return str_contains($this->app->version(), 'Lumen');
/*
Copyright 2017 - 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
*/
/* Amplify Params - DO NOT EDIT