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
import subprocess | |
import urllib, urllib2 | |
DOMAIN = 'https://[スペースID].backlog.jp' | |
API_KEY = '[APIキー]' | |
TICKET_ID = '[チケットID]' | |
API_URL = DOMAIN + '/api/v2/issues/' + TICKET_ID + '/comments?apiKey=' + API_KEY | |
contents = { | |
'content' : subprocess.check_output("date") |
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
yum update -y | |
amazon-linux-extras install -y lamp-mariadb10.2-php7.2 | |
yum install -y mariadb-server | |
yum install -y httpd php php-xml php-mbstring php-zip php-intl | |
cd /usr/local/src/ | |
wget http://downloads.ec-cube.net/src/eccube-4.0.4.zip | |
unzip eccube-4.0.4.zip | |
mv eccube-4.0.4 /var/www/html/ec | |
chown -R apache:apache /var/www/html/ | |
echo -e '<Directory "/var/www/html/ec">\n AllowOverride All\n</Directory>' > /etc/httpd/conf.d/ec.conf |
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
#!/bin/sh | |
yum update -y | |
yum -y groupinstall "Development Tools" | |
yum -y install openssl-devel bzip2-devel readline-devel sqlite-devel libffi-devel | |
git clone https://github.com/yyuu/pyenv.git /opt/pyenv | |
echo 'export PYENV_ROOT="/opt/pyenv"' >> /root/.bash_profile | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /root/.bash_profile | |
echo 'eval "$(pyenv init -)"' >> /root/.bash_profile | |
source /root/.bash_profile | |
pyenv install 3.8.2 |
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
#coding: UTF-8 | |
import os | |
import json | |
import boto3 | |
import urllib.request, urllib.parse | |
from datetime import date, timedelta | |
SPACE_URL = os.environ['SPACE_URL'] | |
API_URL = SPACE_URL + '/api/v2/issues?apiKey=' + os.environ['API_KEY'] |
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
import os | |
import smtplib | |
from email.mime.text import MIMEText | |
def lambda_handler(event, context): | |
to_addr = event.get('to_addr') | |
subject = event.get('subject') | |
body = event.get('body') | |
msg = MIMEText(body) | |
msg['Subject'] = subject |
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
#coding: UTF-8 | |
import os | |
import boto3 | |
import json | |
import copy | |
import urllib.request, urllib.parse | |
from datetime import datetime, timedelta | |
URL = 'https://api.line.me/v2/bot/message/push' |
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
import os | |
import json | |
import urllib.request, urllib.parse | |
URL = 'https://api.line.me/v2/bot/message/push' | |
def lambda_handler(event, context): | |
to = event['to'] if 'to' in event.keys() else os.environ['SEND_TO'] | |
token = event['token'] if 'token' in event.keys() else os.environ['CHANNEL_TOKEN'] | |
headers = { |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script> |
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
export AUTH_KEY=ここにクラウドメッセージングタブのサーバーキーを入力 | |
export SEND_TO=ここにブラウザで取得したInstance ID Tokenを入力 | |
curl -X POST -H "Authorization: key=$AUTH_KEY" -H "Content-Type: application/json" -d '{ "notification": { "title": "This is Title!!!", "body": "Body Body Body.", "icon": "firebase-logo.png" }, "to": "'$SEND_TO'" }' "https://fcm.googleapis.com/fcm/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
cd /usr/share/nginx/html/ | |
svn export --force https://github.com/firebase/quickstart-js/trunk/messaging . | |
cp -pr . ../html.bak | |
vi firebase-messaging-sw.js | |
diff -u ../html.bak/firebase-messaging-sw.js firebase-messaging-sw.js > ../firebase-messaging-sw.js.patch | |
vi index.html | |
diff -u ../html.bak/index.html index.html > ../index.html.patch |