Skip to content

Instantly share code, notes, and snippets.

@kasperpeulen
kasperpeulen / index.html
Last active August 29, 2015 14:16
Hit the Box!
<canvas id="myCanvas" width="500" height="500"></canvas>
@kasperpeulen
kasperpeulen / main.dart
Last active August 29, 2015 14:17
Parameter info
String test = "print(print(as<caret>df),sadfsd,asdf)";
String test2 = "print(print(asdf),sadfsd,as<caret>df)";
String test3 = "print(print(asdf),sadfsd,asdf); int a = 3<caret>;";
String test4 = "if (1 + 1 <caret> == 2)";
String test5 = "asdf";
void main() {
print(parameterInfo(test,test.lastIndexOf("<caret>")));
print(parameterInfo(test2,test2.lastIndexOf("<caret>")));
print(parameterInfo(test3,test3.lastIndexOf("<caret>")));
@kasperpeulen
kasperpeulen / index.html
Last active August 29, 2015 14:17
run button
<button type="button" id="runbutton">
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;">
<path d="M8 5v14l11-7z"></path>
</svg>
Run
</button>
<button type="button" class="error" id="runbutton">
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;">
<path d="M8 5v14l11-7z"></path>
@kasperpeulen
kasperpeulen / index.html
Last active August 29, 2015 14:17
warningbutton
<button type="button" id="runbutton">
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;">
<path d="M8 5v14l11-7z"></path>
</svg>
Run
</button>
<button type="button" id="runbutton">
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;">
<path fill="#4CAF50" d="M8 5v14l11-7z"></path>
@kasperpeulen
kasperpeulen / index.html
Last active August 29, 2015 14:18
Url Exists
import 'dart:async' show Future;
/// This method answers the ultimate question.
Future doAwesomeThing() => new Future.value(42);
main() async {
var result = await doAwesomeThing();
print(result);
}
@kasperpeulen
kasperpeulen / README.md
Last active August 29, 2015 14:24
Basic example illustrating *ng-for in angular2.
@kasperpeulen
kasperpeulen / README.md
Last active August 29, 2015 14:24
An example illustrating how to use [(ng-model)] to set up two way binding using an input element.
@kasperpeulen
kasperpeulen / README.md
Last active August 29, 2015 14:24
A basic example showing how to use the @component annotation in angular2.
@kasperpeulen
kasperpeulen / README.md
Last active August 29, 2015 14:24
A basic example showing how to use *ng-if in angular2.