Skip to content

Instantly share code, notes, and snippets.

View anaisbetts's full-sized avatar

Ani Betts anaisbetts

View GitHub Profile
@anaisbetts
anaisbetts / UIKitExportEnv.cs
Created February 9, 2012 00:05 — forked from praeclarum/UIKitExportEnv.cs
Sometimes, exporting images isn't easy
public class UIKitExportEnv : ExportEnv
{
public UIKitExportEnv (string name, Model model)
: base (name, model)
{
}
protected override void WriteTexture (ITexture texture, ExportedFile file)
{
var width = texture.Width;
using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ReactivePipes.Tests
{
/// <summary>
/// Summary description for UnitTest1
/// </summary>
@anaisbetts
anaisbetts / gist:2606426
Created May 6, 2012 00:02 — forked from rtomayko/gist:2601550
Open beautiful git-scm.com manual pages w/ git help
# The new git-scm.com site includes man pages designed for pleasant viewing in a web browser:
#
# http://git-scm.com/docs
#
# The commands below can be used to configure git to open these pages when
# using `git help <command>' from the command line. Just enter the config
# commands in your shell to modify your ~/.gitconfig file.
# Create a new browser command and configure help -w to use it.
git config --global browser.gitscm.cmd "/bin/sh -c 'open http://git-scm.com/docs/\$(basename \$1 .html)' --"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reactive.Subjects;
using System.Reactive.Linq;
using System.Threading;
namespace MetricPushDemo
{
public async IObservable<int> takeStream(IObservable<int> enum, int count)
{
int i = 0;
return Observable.Create<int>(subj =>
{
foreach (int x in enum)
{
Task<int> task = somethingAsync(x);
int y = await task;