Skip to content

Instantly share code, notes, and snippets.

View devoncarew's full-sized avatar

Devon Carew devoncarew

View GitHub Profile
@devoncarew
devoncarew / gist:6893556
Last active December 25, 2015 01:18 — forked from gaurave/gist:6893461
library git;
import 'dart:async';
import 'dart:html';
import 'dart:js' as js;
import 'package:chrome/app.dart' as chrome;
import 'lib/utils.dart';
@devoncarew
devoncarew / protocol?
Created October 9, 2013 08:04
possible pub server protocol
sample request
{
"method": "uriToAsset",
"id": <number>,
"params": {
"uri": "<relative uri path>"
}
}
@devoncarew
devoncarew / index.html
Last active August 29, 2015 14:05
spark preferences
// Eric's original
{
"stripWhitespaceOnSave": true
"indentation":{
"default":{
"spaces": true,
"character_width": 4
},
"dart":{
@devoncarew
devoncarew / main.dart
Last active September 16, 2023 04:08
helloworld
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
for (int i = 0; i < 4; i++) {
print('hello ${i}');
}
}
@devoncarew
devoncarew / index.html
Last active May 14, 2017 10:01
helloworld html
<!-- Copyright 2015 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Hello world</h2>
<p>Hello world <span id="count"></span>!</p>
@devoncarew
devoncarew / index.html
Last active February 9, 2022 21:23
Sunflower
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Dr. Fibonacci's Sunflower Spectacular</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Solar System</h2>
<div id="container">
<canvas id="area" height="300px"></canvas>
</div>
@devoncarew
devoncarew / main.dart
Last active June 25, 2022 05:39
Fibonacci
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
int i = 20;
print('fibonacci($i) = ${fibonacci(i)}');
}
/// Computes the nth Fibonacci number.
@devoncarew
devoncarew / index.html
Last active August 29, 2015 14:14
Bootstrap demo
<!-- Copyright 2015 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<!-- script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script -->
<nav class="navbar navbar-default">
<div class="container-fluid">
@devoncarew
devoncarew / index.html
Last active October 19, 2018 19:02
WebSocket test
<!-- Copyright 2015 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>A WebSocket test using echo.websocket.org</h2>
<br>
<p>Enter text to echo:</p>