This file contains 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
//upload image for firebase storage | |
private void updateImage(ImageView imageView){ | |
// Create a storage reference from our app | |
FirebaseStorage storage = FirebaseStorage.getInstance(); | |
StorageReference storageRef = storage.getReferenceFromUrl("<your-storage-url>"); | |
String uuid = UUID.randomUUID().toString(); | |
StorageReference mountainsRef = storageRef.child(uuid + ".jpg"); | |
imageView.setDrawingCacheEnabled(true); | |
imageView.buildDrawingCache(); |
This file contains 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
# | |
# UnityYAMLMerge fallback file | |
# | |
# Modify the next two lines if scene or prefab files should fallback | |
# on other that the default fallbacks listed below. | |
# | |
# %l is replaced with the path of you local version | |
# %r is replaced with the path of the incoming remote version | |
# %b is replaced with the common base version | |
# %d is replaced with a path where the result should be written to |
This file contains 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="en"> | |
<head> | |
<base href="https://cdn.rawgit.com/download/polymer-cdn/2.0.1/lib/"> | |
<script src="webcomponentsjs/webcomponents-lite.js"></script> | |
<link rel="import" href="app-layout/app-layout.html"> | |
<link rel="import" href="iron-icon/iron-icon.html"> | |
<link rel="import" href="iron-icons/iron-icons.html"> | |
<link rel="import" href="paper-button/paper-button.html"> | |
<link rel="import" href="paper-checkbox/paper-checkbox.html"> |
This file contains 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
from rx.subjects import Subject | |
def is_even(num): | |
""" | |
偶数かどうかを判定する。filterで呼び出されている。 | |
TrueかFalseを返すのであって、数値自体は返さない。 | |
:param num: | |
:return: Bool | |
""" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
ng new project-name | |
firebase init | |
? What do you want to use as your public directory? dist | |
? Configure as a single-page app (rewrite all urls to /index.html)? Yes | |
? File dist/index.html already exists. Overwrite? No | |
i Skipping write of dist/index.html |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/aws/aws-lambda-go/lambda" | |
"github.com/nlopes/slack" | |
) | |
func Post(event IotButtonEvent) (string, error) { |
This file contains 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
package main | |
import ( | |
"context" | |
"firebase.google.com/go" | |
"google.golang.org/api/option" | |
"log" | |
"time" | |
"github.com/aws/aws-lambda-go/lambda" | |
) |
This file contains 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
# バイナリ作成 | |
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 |