This file contains hidden or 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
| 'use strict'; | |
| const { IncomingWebhook } = require('@slack/client'); | |
| const https = require('https'); | |
| const moment = require('moment'); | |
| async function sendSlackNotification(message) { | |
| const url = process.env.SLACK_INCOMING_WEBHOOK_URL; | |
| const slackIncomingWebhook = new IncomingWebhook(url); | |
| return await slackIncomingWebhook.send({ |
This file contains hidden or 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 { IncomingWebhook } = require('@slack/client'); | |
| const moment = require('moment'); | |
| // SLACK_INCOMING_WEBHOOK_URL と | |
| // SECRET_QUERY_TOKEN を環境変数で設定、 | |
| // SendGrid の HTTP POST URL には | |
| // ?token= で SECRET_QUERY_TOKEN に設定した値を | |
| // トリガーのURLに付けたものを設定すること | |
| async function sendNotification(message) { |
This file contains hidden or 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); | |
| namespace Kurumi; | |
| use InvalidArgumentException; | |
| use LogicException; | |
| use Psr\Container\ContainerInterface; | |
| use Psr\Http\Message\ResponseInterface; | |
| use Psr\Http\Message\ServerRequestInterface; |
This file contains hidden or 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 | |
| $name = $_FILES['inputname']['name']; | |
| if (Normalizer::isNormalized($name, Normalizer::FORM_D)) { | |
| $_FILES['inputname']['name'] = Normalizer::normalize($name, Normalizer::FORM_C); | |
| } | |
This file contains hidden or 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
| source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
| alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1)/'" | |
| GIT_PS1_SHOWDIRTYSTATE=true | |
| GIT_PS1_SHOWSTASHSTATE=true | |
| GIT_PS1_SHOWUNTRACKEDFILES=true | |
| GIT_PS1_SHOWUPSTREAM=auto | |
| export PS1='\[\033[36m\]\u@\h\[\033[00m\]:\[\033[00m\]\w\[\033[34m\]$(__git_ps1)\[\033[00m\] \$ ' | |
This file contains hidden or 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
| use strict; | |
| use warnings; | |
| use Cinnamon::DSL; | |
| set application => 'myapp'; | |
| set repository => 'git@github.com:yourname/myapp.git'; | |
| role devel => ['aws-myapp-01'], { | |
| deploy_to => '/home/ec2-user/apps/myapp-devel', | |
| branch => 'master', |
This file contains hidden or 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
| # for 4-inch display (iPhone 5) | |
| convert -crop 640x1096+0+40 input.png output.png | |
| # for 3.5-inch display (iPhone 4/4S) | |
| convert -crop 640x920+0+40 input.png output.png |
This file contains hidden or 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
| { | |
| "require": { | |
| "karinto/karinto": "dev-master" | |
| } | |
| } |
This file contains hidden or 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($) { | |
| $.fn.taphold = function(tapholdCallback, duration) { | |
| var timerId; | |
| var toClick = true; | |
| duration = duration || 720; | |
| if (typeof window.ontouchstart !== "undefined" | |
| && typeof tapholdCallback == "function") { | |
| $(this).css("webkitTouchCallout", "none"); | |
| $(this).on("touchstart", function(e) { | |
| e.preventDefault(); |
NewerOlder