Skip to content

Instantly share code, notes, and snippets.

🚀
👁👃👁

Suguru Kishimoto sgr-ksmt

🚀
👁👃👁
View GitHub Profile
View wrap_example.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
@sgr-ksmt
sgr-ksmt / firebase_test_helper.ts
Created Jun 3, 2020
Helper functions of Firebase test for Cloud Functions and firestore.rules
View firebase_test_helper.ts
import * as firebase from '@firebase/testing'
import * as fs from 'fs'
const REAL_FIREBASE_PROJECT_ID = '<please input your firebase project id here>'
export const makeTestProjectID = (projectName = 'test') => {
const hrTime = process.hrtime()
return `${projectName}${(hrTime[0] * 1000000 + hrTime[1] / 1000) * 1000}`
}
@sgr-ksmt
sgr-ksmt / _usage.dart
Last active May 5, 2020
BouncedWidget
View _usage.dart
Widget buld(BuildContext context) {
return BouncedWidget.create(
child: const SomeListTile(),
bounce: 0.1,
duration: const Duration(milliseconds: 350),
);
}
@sgr-ksmt
sgr-ksmt / progress_button.dart
Created Apr 7, 2020
[Flutter] ProgressButton
View progress_button.dart
import 'package:flutter/material.dart';
@immutable
class ProgressButton extends StatelessWidget {
const ProgressButton({
@required this.title,
@required this.onPressed,
this.processing = false,
this.enabled = true,
});
@sgr-ksmt
sgr-ksmt / main.dart
Last active Apr 7, 2020
[Flutter] ProgressButton
View main.dart
import 'package:flutter/material.dart';
@immutable
class ProgressButton extends StatelessWidget {
const ProgressButton({
@required this.title,
@required this.onPressed,
this.processing = false,
this.enabled = true,
});
@sgr-ksmt
sgr-ksmt / baseFunctions.ts
Created Apr 4, 2020
Wrap firebase-functions with specified region.
View baseFunctions.ts
import * as f from 'firebase-functions'
const functions = (runtimeOptions: f.RuntimeOptions = {}) =>
f.runWith(runtimeOptions).region('asia-northeast1')
export default functions
@sgr-ksmt
sgr-ksmt / job_description_2020-04-01.md
Last active Jun 26, 2020
2020/05以降のお仕事を探しています。
View job_description_2020-04-01.md

募集

2020年5月以降(早くて4月中旬以降)を目処に、副業先を探しています。

連絡先

TwitterのDM或いは、以下のメールアドレス宛にお願いします。([at]→@)

melodydance.k.s+biz[at]gmail.com
View snippets|dart.json
{
"freezed":{
"prefix": "freezed",
"body": [
"import 'package:flutter/foundation.dart';",
"import 'package:freezed_annotation/freezed_annotation.dart';",
"",
"part '$1.freezed.dart';",
"part '$1.g.dart';",
"",
@sgr-ksmt
sgr-ksmt / firestore.rules
Created Dec 31, 2019
Convenience `firestore.rules`'s function.
View firestore.rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Create `Path` from array of string.
function documentPath(paths) {
return path([
['databases', database, 'documents'].join('/'),
paths.join('/')
].join('/'));
}
@sgr-ksmt
sgr-ksmt / ModelA.swift
Last active Nov 2, 2019
PropertyWrapper+Codable crash.
View ModelA.swift
struct ModelA: Codable {
@Wrap<ModelA> var a: String? = "foobar"
}
You can’t perform that action at this time.