Skip to content

Instantly share code, notes, and snippets.

View mono0926's full-sized avatar
🐶
( ´・‿・`)

mono — Masayuki Ono mono0926

🐶
( ´・‿・`)
View GitHub Profile
@mono0926
mono0926 / infinite_scrolling.dart
Last active August 1, 2022 10:27 — forked from Roaa94/infinite_scrolling.dart
Infinite Scrolling with Riverpod
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
void main() {
runApp(const ProviderScope(child: App()));
}
class App extends StatelessWidget {
const App({super.key});
@mono0926
mono0926 / settings.json
Last active March 9, 2022 06:20 — forked from gaetschwartz/settings.json
Nest files in Flutter projects on VSCode, inspired from https://github.com/antfu/vscode-file-nesting-config
"explorer.experimental.fileNesting.enabled": true,
"explorer.experimental.fileNesting.expand": false,
"explorer.experimental.fileNesting.patterns": {
"pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml, l10n.yaml",
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
"readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
},
@mono0926
mono0926 / main.dart
Last active March 23, 2020 11:28 — forked from rrousselGit/main.dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
// Mimicking the behavior of VSyncProvider through a global variable
TickerProvider vsync;
void main() {
runApp(_SwitchingThemeApp());
}
/// Properties that help me keep track of the example being run.
bool _useMaterial = false;
class _SwitchingThemeApp extends StatefulWidget {
@override
_SwitchingThemeAppState createState() => _SwitchingThemeAppState();
import 'package:flutter_web/material.dart';
// Full screen box that's filled with the theme's primary color.
// Contains an icon and 'Hello World' text.
class PrimaryBox extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
alignment: Alignment.center,
color: Theme.of(context).primaryColor,
@mono0926
mono0926 / big_query_examples.md
Last active March 15, 2018 10:44 — forked from arfon/big_query_examples.md
BigQuery Examples for blog post

How many times shouldn't it happen...

-- https://news.ycombinator.com/item?id=11396045

SELECT count(1)
FROM (SELECT id, repo_name, path
        FROM `bigquery-public-data.github_repos.sample_files`
      ) AS F
JOIN (SELECT id
// https://gist.github.com/ha1f/884ce4870dc395639e86c4395f5ea947 の案1のweak版
extension UIView {
/// Returns UILayoutGuide compatible with safeAreaLayoutGuide.
/// `.safeAreaLayoutGuide` is available only iOS 11+, but safeAreaLayoutGuide
/// should be same as layoutguide of UIView under iOS 11.
///
/// - returns safeAreaLayoutGuide or layoutGuide of self
func safeLayoutGuideOrSelfLayoutGuide() -> UILayoutGuide {
if #available(iOS 11.0, *) {
@mono0926
mono0926 / Activity.swift
Last active July 6, 2020 14:49 — forked from zwaldowski/Activity.swift
os_activity_t for Swift 4
//
// Activity.swift
//
// Created by Zachary Waldowski on 8/21/16.
// Copyright © 2016 Zachary Waldowski. Licensed under MIT.
//
import os.activity
private final class LegacyActivityContext {

storyboard上で、initial view controllerから他のview controllerに対してrelationshipを確立します。同様に、それらのview controllerから他のview controllerにrelationshipを確立します。最終的に、storyboard上のほとんど、あるいは全てのview controllerを一つのグラフに接続します。接続されたview controllerが、iOSによっていつインスタンス化されるかは、relationshipのタイプによって決まります。

<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>