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
try { | |
doSomething() | |
} catch(error) { | |
Raven.captureException(error) | |
} |
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
library cookie; | |
import 'dart:html'; | |
/* | |
* dart document.cookie lib | |
* | |
* ported from | |
* http://www.quirksmode.org/js/cookies.html | |
* |
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
<x-secret placeholder="Choose a Password"></x-secret> |
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 {findAll} from 'react-shallow-testutils'; | |
import objectMatches from 'object-matches'; | |
import inspectReactElement from 'inspect-react-element'; | |
const findAllMatching = (rootElementTree, elementTreeToMatch) => { | |
return findAll(rootElementTree, (element) => { | |
// In case a null is passed for a template value | |
if (element === null) return false; | |
const matchType = (elementTreeToMatch.type ? element.type === elementTreeToMatch.type : 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
#!/usr/bin/env dart | |
import 'dart:io'; | |
import 'dart:async'; | |
main() { | |
// find and run Dartium with type checks and asserts enabled | |
var whichDart = Process.run('which', ['dart']); | |
whichDart.then((command) { | |
var dartiumExecutable = new Path(command.stdout).join(new Path('../../../chromium/Chromium.app/Contents/MacOS/Chromium')); |
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
void main() { | |
} |
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 'package:polymer/polymer.dart'; | |
import 'package:observe/observe.dart'; | |
class CountdownClock extends CustomElement with ObservableMixin { | |
static final oneSecond = new Duration(seconds: 1); | |
@observable var timeLeft = new Duration(seconds: 72); | |
/* |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="import" href="countdown_clock.html"> | |
</head> | |
<body> | |
<h1>Alarm</h1> | |
<div is="countdown-clock"></div> | |
<script type="application/dart" src="alarm.dart"></script> |
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:mdv/mdv.dart' as mdv; | |
void main() { | |
mdv.initialize(); | |
} |
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
type UnicornEditorState = { | |
editorState: any, | |
} | |
export default class UnicornEditor extends Component { | |
state: UnicornEditorState = { | |
editorState: EditorState.createEmpty(compositeDecorator), | |
someOtherVariable: 'Should throw an error?', | |
}; |