Skip to content

Instantly share code, notes, and snippets.

mogetta mogeta

Block or report user

Report or block mogeta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mogeta
mogeta / back.py
Created Feb 15, 2019
AppiumとAirtestを利用したハイブリッドゲームアップのE2Eテスト
View back.py
# -*- encoding=utf8 -*-
from airtest.core.api import *
auto_setup(__file__)
# 指定画像を捜査しタッチ捜査をおこなう。
# back.airディレクトリ内に画像配置済み
def back_button():
touch(Template(r"tpl1550048906014.png", record_pos=(-0.472, -0.255), resolution=(1920, 1080)))
@mogeta
mogeta / functions_exmaple.dart
Created Jan 22, 2019
Firebase環境でWebPush
View functions_exmaple.dart
//こっちはFunctions側
import 'package:http/http.dart' as http;
import 'package:sprintf/sprintf.dart';
const String ENDPOINT = 'https://iid.googleapis.com/iid/v1/%s/rel/topics/%s';
Future<int> Subscribe(String serverKey, String token, String topic) async {
int status;
var url = sprintf(ENDPOINT, [token, topic]);
print(url);
View app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
View flutter doctor.log
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.8.2, on Microsoft Windows [Version 10.0.17134.285], locale ja-JP)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] VS Code (version 1.27.2)
[!] Connected devices
! No devices available
! Doctor found issues in 1 category.
View gist:b1e4b1b3a9c46bbd677098a97684f5da
choco install dart-lang
choco install androidstudio
flutter doctor
flutter doctor --android-licenses
View gist:e6a6cb6298889bded777454908a5590f
Not ignored files:
└─ dist/bundle.js
Ignored files:
└─ dist/appsscript.json
View food_from_photo_api.go
package main
import (
"context"
"golang.org/x/oauth2"
"fmt"
"log"
"golang.org/x/oauth2/google"
"io/ioutil"
"google.golang.org/api/photoslibrary/v1"
View request.json
{
"filters": {
"dateFilter": {
"dates": [
{
"day": 11,
"month": 6,
"year": 2018
}
]
@mogeta
mogeta / sample.sh
Created Jun 9, 2018
Lambda周りのコマンド類
View sample.sh
# バイナリ作成
env GOARCH=amd64 GOOS=linux go build myfirestore.go struct.go
# テスト環境で実行
sam local invoke -e event.json -t template.yaml --env-vars sam_env.json
# Lambdaに上げるファイルの作成。secret_keyをアップロードするのを忘れずに
zip myfirestore.zip myfirestore firebase_secret_key.json
@mogeta
mogeta / myFirestore.go
Created Jun 9, 2018
lambdaからfirebase
View myFirestore.go
package main
import (
"context"
"firebase.google.com/go"
"google.golang.org/api/option"
"log"
"time"
"github.com/aws/aws-lambda-go/lambda"
)
You can’t perform that action at this time.