Hi, my name is smd877.
- List1
- List2
| 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 |
| --- ../html.bak/firebase-messaging-sw.js 2019-07-04 03:46:11.000000000 +0900 | |
| +++ firebase-messaging-sw.js 2019-07-04 11:41:01.940048485 +0900 | |
| @@ -1,9 +1,19 @@ | |
| // Import and configure the Firebase SDK | |
| // These scripts are made available when the app is served or deployed on Firebase Hosting | |
| // If you do not serve/host your project using Firebase Hosting see https://firebase.google.com/docs/web/setup | |
| -importScripts('/__/firebase/5.5.6/firebase-app.js'); | |
| -importScripts('/__/firebase/5.5.6/firebase-messaging.js'); | |
| -importScripts('/__/firebase/init.js'); | |
| +importScripts('https://www.gstatic.com/firebasejs/6.2.4/firebase-app.js'); |
| --- ../html.bak/index.html 2019-07-04 03:46:11.000000000 +0900 | |
| +++ index.html 2019-07-04 11:45:24.008447808 +0900 | |
| @@ -75,9 +75,22 @@ | |
| <!-- Import and configure the Firebase SDK --> | |
| <!-- These scripts are made available when the app is served or deployed on Firebase Hosting --> | |
| <!-- If you do not serve/host your project using Firebase Hosting see https://firebase.google.com/docs/web/setup --> | |
| -<script src="/__/firebase/6.2.4/firebase-app.js"></script> | |
| -<script src="/__/firebase/6.2.4/firebase-messaging.js"></script> | |
| -<script src="/__/firebase/init.js"></script> | |
| +<script src="https://www.gstatic.com/firebasejs/6.2.4/firebase-app.js"></script> |
| #coding: UTF-8 | |
| import os | |
| import json | |
| import urllib.request, urllib.parse | |
| SEND_URL = 'https://fcm.googleapis.com/fcm/send' | |
| def lambda_handler(event, context): | |
| headers = { | |
| 'Content-Type': 'application/json', |
| #coding: UTF-8 | |
| import os | |
| import smtplib | |
| from email.mime.text import MIMEText | |
| # Gmailアカウント | |
| FROM_ADDR = os.environ['mail_from_addr'] | |
| # アプリパスワード | |
| PASSWD = os.environ['mail_passwd'] | |
| # 送信先メールアドレス |
| import boto3 | |
| def lambda_handler(event, context): | |
| command = event.get('command') | |
| if command in ['start', 'stop', 'status']: | |
| try: | |
| instance = boto3.resource('ec2').Instance(event.get('target')) | |
| state = instance.state['Name'] | |
| if command == 'start' and state == 'stopped': | |
| instance.start() |
| package jp.gr.java_conf.smd877.simplesample; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.app.Activity; | |
| /** | |
| * xmlパーサーSimpleを試すためのActivity | |
| */ | |
| public class SimpleSampleActivity extends Activity { |
| SELECT T2.relname | |
| , T2.reltuples | |
| FROM pg_stat_user_tables AS T1 | |
| INNER JOIN pg_class AS T2 | |
| ON T1.relname = T2.relname | |
| ORDER BY T2.relname; |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import org.apache.http.HttpEntity; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.NameValuePair; | |
| import org.apache.http.client.HttpClient; | |
| import org.apache.http.client.entity.UrlEncodedFormEntity; | |
| import org.apache.http.client.methods.HttpPost; | |
| import org.apache.http.impl.client.DefaultHttpClient; |