Skip to content

Instantly share code, notes, and snippets.

View sethladd's full-sized avatar

Seth Ladd sethladd

View GitHub Profile
@sethladd
sethladd / Original.dart
Last active June 3, 2017 18:19 — forked from asarazan/Original.dart
Comparing Flutter to what it might look like in Kotlin, Dart.soon, and Dart.wishlist
class TutorialHome extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Scafold is a layout for the major material design widgets.
return new Scaffold(
appBar: new AppBar(
leading: new IconButton(
icon: new Icon(Icons.menu),
tooltip: 'Navigation menu',
onPressed: null,
import 'dart:collection';
void main() {
var list = new WatchList([1,2,3,4,5]);
var mapped = list.where((x) => x.isEven).map((x) => x*2);
// What is printed here?
print(list.accessCount);
#!/bin/sh
DARTFILENAME=$1.dart
HTMLFILENAME=$1.html
ELEMENTNAME=$2
LIBNAME=`echo $2 | sed -e "s/-/_/g"`
CLASSNAME=$3
echo > $HTMLFILENAME
echo "<head>" >> $HTMLFILENAME
import 'dart:io';
import 'dart:async';
import 'dart:math';
// The following function is part of a third-party package that you can't touch.
Future doCoolStuff() {
var completer = new Completer();
// Sometimes bad things happen.
if (new Random().nextBool()) {
@sethladd
sethladd / .bash_profile
Created March 14, 2010 08:55 — forked from aeden/gist:331864
.bash_profile
export PATH=$PATH:/Users/sladd/.gem/ruby/1.8/bin
alias gst='git status '
alias gc='git commit '
alias gca='git commit -a '
alias ga='git add '
alias gco='git checkout '
alias gb='git branch '
alias gm='git merge '
alias gp='git push '
@sethladd
sethladd / gist:119039
Created May 28, 2009 02:00 — forked from dburger/gist:118842
create a new bare shared git repository
ssh gitserver.com
mkdir -p /var/data/repos/myrepo.git
cd /var/data/repos/myrepo.git
git --bare init --shared=group