Skip to content

Instantly share code, notes, and snippets.

@johnpryan
johnpryan / index.html
Last active August 9, 2016 21:13
js interop enumerable properties
<!DOCTYPE html>
<html>
<head>
<title>js_interop_bug</title>
<link rel="stylesheet" href="styles.css">
<script src="index.js" type="text/javascript"></script>
<script defer src="main.dart" type="application/dart"></script>
<script defer src="packages/browser/dart.js"></script>
</head>
<body>
@johnpryan
johnpryan / designer.html
Created August 30, 2016 22:03
designer
<link rel="import" href="../ace-element/ace-element.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@johnpryan
johnpryan / .sh
Created December 7, 2016 21:38
Install an old version of a Homebrew Cask
cd /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart
git remote rm origin
git checkout -B master OLD_COMMIT_HASH
brew unlink dart
brew install dart --with-dartium --with-content-shell

Keybase proof

I hereby claim:

  • I am johnpryan on github.
  • I am jpryan (https://keybase.io/jpryan) on keybase.
  • I have a public key ASDOX-dRfNjzQZqfSZVTEaqkyxs9jtNtuca8WLsL-oKmVgo

To claim this, I am signing this object:

@johnpryan
johnpryan / template.dart
Created January 9, 2018 21:34
IntelliJ templates for PolymerDart
@HtmlImport('${NAME}.html')
library ${NAME};
import 'package:polymer/polymer.dart';
import 'package:web_components/web_components.dart';
@PolymerRegister(${CLASS_NAME}.tag)
class ${CLASS_NAME} extends PolymerElement {
static const String tag = '${TAG_NAME}';

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@johnpryan
johnpryan / principles.md
Last active June 22, 2022 03:43
Ray Dalio's Principles

Summary And Table Of Life Principles

Think for yourself to decide 1) what you want, 2) what is true, and 3) what you should do to achieve #1 in light of #2, and do that with humility and open-mindedness so that you consider the best thinking available to you.

Life Principles Introduction

Look to the patterns of those things that affect you in order to understand the cause-effect relationships that drive them and to learn principles for dealing with them effectively.

Part II: Life Principles

@johnpryan
johnpryan / hello_world.dart
Last active November 19, 2019 18:46
flutter hello world
import 'package:flutter_web/material.dart';
import 'package:flutter_web_test/flutter_web_test.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
Future main() async {
await ui.webOnlyInitializePlatform();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@johnpryan
johnpryan / hint.txt
Created May 31, 2019 21:00 — forked from legalcodes/hint.txt
Practice Using async and await
Did you remember to add the async keyword to the getChange function?
Did you remember to use the await keyword before invoking getDollarAmount?
Remember: 'getChange' needs to return a future!
@johnpryan
johnpryan / hint.txt
Last active July 18, 2019 21:28 — forked from RedBrogdon/hint.txt
Flutter Codelab - 9 - SizedBox
The important thing here is to add a SizedBox in between the other two widgets, and use `width: 50` to set its width.