Skip to content

Instantly share code, notes, and snippets.

View munificent's full-sized avatar

Bob Nystrom munificent

View GitHub Profile
@munificent
munificent / server.dart
Created September 5, 2012 22:54
Awesome Dart web server
#import('dart:io');
#import('dart:isolate');
void main() {
var type = 'fast';
var args = new Options().arguments;
if (args.length > 0) {
type = args[0];
}
@munificent
munificent / HelloDartTest.dart
Created November 22, 2011 06:05
Dart Compilation
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Simple test program invoked with an option to eagerly
// compile all code that is loaded in the isolate.
// Compiled using frog, the in-progress self-hosted compiler:
// dart/frog$ ./frogsh --out=hello.js --compile-only samples/hello.dart
class HelloDartTest {
static testMain() {
$ git branch -avv; git remote -v
blogofile d3f4117 Start styling and setting up blogofile templates.
* master 04ba27e [origin/master: ahead 9] New post about new blog.
remotes/origin/master d3f4117 Start styling and setting up blogofile templates.
origin [email protected]:munificent/journal.git (fetch)
origin [email protected]:munificent/journal.git (push)
@munificent
munificent / gist:1225296
Created September 18, 2011 17:20
Problem pushing to github
After a long delay, this is the result I get:
$ git push
Connection closed by 207.97.227.239
fatal: The remote end hung up unexpectedly
This, as far as I can tell, started happening spontaneously. Up until this point,
I've been able to push to github without any problems. I haven't changed anything
with my ssh keys.
@munificent
munificent / 2 - Plan 9
Created July 20, 2011 04:13
UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c
#include <u.h>
#include <libc.h>
void
main(int argc, char *argv[])
{
int noNewline;
int arg, length;
char *output, *p;
@munificent
munificent / Sieve.mag
Created June 14, 2011 17:06 — forked from dscleaver/Sieve.mag
Implementation of the Sieve of Eratosthenes in Magpie
import async
def spawnGenerator(channel is Channel)
run with for i = count(from: 2, by: 1) do channel send(i)
end
def spawnFilter(in is Channel, prime is Int)
val out = Channel new(1)
run with
while true do