Skip to content

Instantly share code, notes, and snippets.

View damondouglas's full-sized avatar
💭
😼

Damon damondouglas

💭
😼
  • Google, Inc.
View GitHub Profile
@damondouglas
damondouglas / bash script that runs hop
Created April 19, 2013 23:30
chmod +x hop.sh run as ./hop.sh
#!/bin/bash
cd ..
dart tool/hop_runner.dart analyze --verbose
@damondouglas
damondouglas / webui_compiler.dart
Last active December 16, 2015 19:39
createWebuiCompilerTask
library hop_runner;
import 'dart:async';
import 'dart:io';
import 'package:hop/hop.dart';
import 'package:hop/hop_tasks.dart';
void main(){
final String out = "out/";
@damondouglas
damondouglas / today.do
Last active December 16, 2015 20:09
use stata to convert today's date in %td format see stata cheat sheet: http://econweb.tamu.edu/jnighohossian/tools/stata/dates.html
display date(c(current_date),"DMY")
@damondouglas
damondouglas / convertdate.do
Created April 30, 2013 16:33
convert %tc to %td in stata
gen mydate = clock("30Apr2013 00:00:00","DMYhms")
display dofc(mydate)
@damondouglas
damondouglas / hop_runner.dart
Last active December 16, 2015 20:39
Chained webui compiler.
library hop_runner;
import 'dart:async';
import 'dart:io';
import 'package:hop/hop.dart';
import 'package:hop/hop_tasks.dart';
void main() {
final String out = "out";
@damondouglas
damondouglas / singleWhere.dart
Created May 19, 2013 17:54
How to use Iterable.singleWhere
var statemap = {
"hide":"icon-double-angle-up icon-1x",
"show":"icon-double-angle-down icon-1x"
};
var itr = statemap.keys;
var value = "hide";
value = itr.singleWhere((e){
return e != value;
});
print(value); // show
@damondouglas
damondouglas / clean cache
Last active December 17, 2015 16:39
compass commands
compass clean
@damondouglas
damondouglas / nested.dart
Created July 4, 2013 18:17
Nested ? and : in Dart
void main() {
var a = 0;
var b = 2;
var c =
a == 0 ?
b == 0 ? 0 : 1
: 2;
@damondouglas
damondouglas / copy pwd to clipboard.sh
Created July 11, 2013 03:37
pwd | tr -d '\n' | pbcopy
pwd | tr -d '\n' | pbcopy
@damondouglas
damondouglas / browseroutput.txt
Created July 11, 2013 05:28
Trying Headless Testing in Dart with Content Shell
PASS
1 PASS Expectation: text says Click Me!.
All 1 tests passed