View gist:8a819c292b39826382f242415dc19b21
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
# disable sleep | |
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1 | |
# re-enable sleep | |
sudo pmset -b sleep 5; sudo pmset -b disablesleep 0 |
View flutter_animations.dart
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
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, |
View flutter_xcode_cloud_script.sh
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
#!/bin/sh | |
# Install CocoaPods using Homebrew. | |
brew install cocoapods | |
# Install Flutter | |
brew install --cask flutter | |
# Run Flutter doctor | |
flutter doctor |
View flutter_master_detail.dart
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
import 'package:flutter/material.dart'; | |
class MasterDetail<T> extends StatefulWidget { | |
const MasterDetail({ | |
Key? key, | |
required this.listBuilder, | |
required this.detailBuilder, | |
required this.onPush, | |
this.emptyBuilder, | |
}) : super(key: key); |
View theme-adapter.css
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
:root { | |
--mdc-theme-primary: var(--md-sys-color-primary); | |
--mdc-theme-on-primary: var(--md-sys--coloron-primary); | |
--mdc-theme-background: var(--md-sys--colorbackground); | |
--mdc-theme-on-background: var(--md-sys--coloron-background); | |
--mdc-theme-on-surface-variant: var(--md-sys--coloron-surface-variant); | |
--mdc-theme-surface-variant: var(--md-sys--colorsurface-variant); | |
--mdc-theme-on-surface: var(--md-sys--coloron-surface); | |
--mdc-theme-surface: var(--md-sys--colorsurface); | |
--mdc-theme-text-primary-on-background: var(--md-sys--coloron-surface-variant); |
View material_outlined_card.dart
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
import 'package:flutter/material.dart'; | |
class OutlinedCard extends StatefulWidget { | |
const OutlinedCard({ | |
Key? key, | |
required this.child, | |
}) : super(key: key); | |
final Widget child; |
View controller.ts
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
import { drawInfiniteGrid } from "./infinite-grid"; | |
import { | |
CanvasTransformer, | |
CanvasTransformerOptions, | |
defaultOptions, | |
} from "./transformer"; | |
import { color } from "./utils"; | |
export class CanvasController< | |
T extends CanvasWidget |
View color-input.ts
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
import { html, css, LitElement } from "lit"; | |
import { customElement, property } from "lit/decorators.js"; | |
/** Color Input */ | |
@customElement("color-input") | |
export class ColorInput extends LitElement { | |
static override styles = css` | |
main { | |
--input-size: 48px; | |
--padding: 4px; |
View action.dart
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
import 'package:flutter/material.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import '../model.dart'; | |
abstract class AppAction extends Intent { | |
LogicalKeySet? get keys => null; | |
void action(AppModel model); | |
String get label; |
View app.js
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
import * as utils from "https://cdn.skypack.dev/@guidezpl/material-color-utilities"; | |
function themeFromSeed(seed) { | |
const palette = utils.CorePalette.of(seed); | |
return { | |
seed: seed, | |
schemes: { | |
light: utils.Scheme.light(seed), | |
dark: utils.Scheme.dark(seed), | |
}, |
NewerOlder