Skip to content

Instantly share code, notes, and snippets.

View leedohyung-dba's full-sized avatar
🤡
have rats

lee leedohyung-dba

🤡
have rats
View GitHub Profile
@leedohyung-dba
leedohyung-dba / default_handler.js
Last active December 5, 2018 04:34
注目されるAlexa、そして開発中引っかかった話 ref: https://qiita.com/leedohyung-dba/items/d5471b21f09a667f4835
...
'AskForTheMeetingRoomReservation': function() {
const mr = this.event.request.intent.slots.meeting_room || false;
const t = this.event.request.intent.slots.time || false;
const aipoObj = Aipo.new(AIPO_KEY);
const requestId = this.event.request.requestId;
const token = this.event.context.System.apiAccessToken;
const endpoint = this.event.context.System.apiEndpoint;
const ds = new Alexa.services.DirectiveService();
delete from [テーブル名];
@leedohyung-dba
leedohyung-dba / file0.sh
Created July 7, 2018 11:12
前段にWAFがあるWebサーバにmod_rewrite設定した後、特定IPだけ許可する設定の問題点と解決方法 ref: https://qiita.com/leedohyung-dba/items/9bc24a8d289f0c44ae1c
echo "RemoteIPHeader X-Forwarded-For" > /etc/httpd24/conf.d/mod_remoteip.conf
echo "RemoteIPTrustedProxy <WAFのIPアドレス1> <WAFのIPアドレス2>" >> /etc/httpd24/conf.d/mod_remoteip.conf
service httpd24-httpd restart
@leedohyung-dba
leedohyung-dba / file0.txt
Created May 24, 2018 05:10
定期的にLet's Encrypt証明書を更新してSlackでアナウンス ref: https://qiita.com/leedohyung-dba/items/947185ab37818b66bacd
0 4 1 1,3,5,7,9,11 * root /usr/bin/systemctl stop httpd.service && /usr/bin/certbot renew --force-renew --quiet --post-hook "/usr/bin/systemctl start httpd.service"
@leedohyung-dba
leedohyung-dba / FriendCodeSolts
Last active December 22, 2017 05:13
Alexa Skill Kitの紹介&GitHubの音声認識インタフェース能力実装 ref: https://qiita.com/leedohyung-dba/items/a7ae594e1d455e2f962c
lee
dohyung
sakura
hamano
@leedohyung-dba
leedohyung-dba / Vagrantfile
Last active October 25, 2017 08:17
Ansible自体を知らない人が本番に使える人になるまでのスタディー ref: http://qiita.com/leedohyung-dba/items/59be7006182a8a0b4cc0
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.define "host" do |node|
node.vm.box = "geerlingguy/centos7"
node.vm.hostname = "host"
node.vm.network :private_network, ip: "192.168.43.51"
end
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
@leedohyung-dba
leedohyung-dba / file0.sh
Last active December 25, 2016 19:00
ServerlessでCloudWatchのSlackアラームボットを簡単に構築 ref: http://qiita.com/leedohyung-dba/items/3d36c31ab2ddfb9e9e78
$ aws kms encrypt --key-id alias/encryption_key_wu --plaintext "hooks.slack.com/services/******/*******/*****"
@leedohyung-dba
leedohyung-dba / file0.txt
Last active November 16, 2016 06:46
AWSのCDNサービスCloudFrontを始める (実習オリジンサーバー:S3) ref: http://qiita.com/leedohyung-dba/items/63ddf183fa22ba8b952e
CloudFront は、静的および動的なウェブコンテンツ(.html、.css、.php、イメージファイルなど)をエンドユーザーに高速に配信するウェブサービスです。CloudFront は、エッジロケーションというデータセンターの世界的ネットワークを経由してコンテンツを配信します。CloudFront を使用して提供されているコンテンツをユーザーがリクエストすると、そのユーザーはエッジロケーションにルーティングされます。エッジロケーションでは最も低いレイテンシー(遅延時間)が提供されるので、コンテンツは可能な最高のパフォーマンスで配信されます。コンテンツがエッジロケーション内に最も低いレイテンシーですでに存在している場合、CloudFront はそのコンテンツを即時に配信します。コンテンツがこのエッジロケーションに現在存在しない場合、CloudFront は、コンテンツの最終バージョンのソースとして識別されている Amazon S3 バケットまたは HTTP サーバー(ウェブサーバーなど)からコンテンツを取り込みます。
@leedohyung-dba
leedohyung-dba / composer.json
Created September 30, 2016 05:32
[PHP]薄くて簡単なORMを導入する場合、おすすめライブラリー「Idiorm」 ref: http://qiita.com/leedohyung-dba/items/b6ee3f744aa92cf83865
"require": {
"j4mie/idiorm": "1.5.1"
}