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'; | |
void main() => runApp(App()); | |
class App extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp(home: Scaffold(body: Center(child: MicroTask()))); | |
} | |
} |
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
fuchsia git:(master) ✗ fx emu -N | |
sudo follows to configure the tap interface: | |
Creating disk image...done | |
+ /Volumes/Fuchsia/fuchsia/prebuilt/third_party/aemu/mac-x64/emulator -feature VirtioInput,GLDirectMem,HVF,Vulkan -window-size 1280x800 -gpu auto -fuchsia -kernel /Volumes/Fuchsia/fuchsia/out/default/multiboot.bin -initrd /var/folders/89/38yds5s56613bmsc4yrd_6zm0000gn/T/tmp.x1ru1xpD/fuchsia-ssh.zbi -m 8192 -serial stdio -vga none -device virtio-keyboard-pci -device virtio_input_multi_touch_pci_1 -smp 4,threads=2 -machine q35 -device isa-debug-exit,iobase=0xf4,iosize=0x04 -enable-hvf -cpu Haswell -netdev type=tap,ifname=tap0,id=net0,script=/Volumes/Fuchsia/fuchsia/tools/devshell/lib/emu-ifup-macos.sh -device e1000,netdev=net0,mac=52:54:00:4d:27:96 -drive file=/var/folders/89/38yds5s56613bmsc4yrd_6zm0000gn/T/tmp.x1ru1xpD/fvm.blk,format=raw,if=none,id=vdisk -device virtio-blk-pci,drive=vdisk -append 'TERM=xterm-256color kernel.serial=legacy kernel.entropy-mixin=d9ec8927ffa9b8d1344389d717cfe46ec1560a882cd |
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
curl -s "https://fuchsia.googlesource.com/fuchsia/+/master/scripts/bootstrap?format=TEXT" | base64 --decode | bash | |
cipd bootstrapped to path:"/Volumes/Extra/fuchsia/.jiri_root/bin/cipd" | |
Please add /Volumes/Extra/fuchsia/.jiri_root/bin to your PATH | |
[22:40:21.603] WARN: Please opt in or out of analytics collection. You will receive this warning until an option is selected. | |
To check what data we collect run: jiri init -show-analytics-data | |
To opt-in run: jiri init -analytics-opt=true "/Volumes/Extra/fuchsia" | |
To opt-out run: jiri init -analytics-opt=false "/Volumes/Extra/fuchsia" | |
[22:40:21.608] WARN: Please opt in or out of analytics collection. You will receive this warning until an option is selected. | |
To check what data we collect run: jiri init -show-analytics-data |
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:collection/collection.dart'; | |
import 'package:meta/meta.dart' show immutable; | |
////////////////////////////////////////////// | |
// Public Api | |
////////////////////////////////////////////// | |
@immutable | |
@equatableProps | |
class SomeObject extends $_SomeObjectEquatable { | |
final int one; |
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
Source https://stackoverflow.com/questions/11197509/how-to-get-device-make-and-model-on-ios | |
@"iPhone1,1" on iPhone | |
@"iPhone1,2" on iPhone 3G | |
@"iPhone2,1" on iPhone 3GS | |
@"iPhone3,1" on iPhone 4 (GSM) | |
@"iPhone3,3" on iPhone 4 (CDMA/Verizon/Sprint) | |
@"iPhone4,1" on iPhone 4S | |
@"iPhone5,1" on iPhone 5 (model A1428, AT&T/Canada) | |
@"iPhone5,2" on iPhone 5 (model A1429, everything else) |
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" | |
"os" | |
"path/filepath" | |
"strings" | |
"log" | |
) |
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 "github.com/tkrajina/typescriptify-golang-structs/typescriptify" | |
import ( | |
"github.com/gogs/go-gogs-client" | |
) | |
func main() { | |
converter := typescriptify.New() | |
converter.CreateFromMethod = true |
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 'dart:async'; | |
import 'dart:collection'; | |
import 'package:rxdart/rxdart.dart'; | |
class QueueSubject<T> extends Subject<T> implements ReplayObservable<T> { | |
final Queue<T> _queue; | |
final int _maxSize; | |
factory QueueSubject({ |
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
class MyClass { | |
static final MyClass _singleton = new MyClass._internal(); | |
factory MyClass() { | |
return _singleton; | |
} | |
MyClass._internal() { | |
... // initialization logic here | |
} |
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
<script> | |
function execPolyfill() { | |
(function(){ | |
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1. | |
/* | |
Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | |
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |