Skip to content

Instantly share code, notes, and snippets.

View anaisbetts's full-sized avatar

Ani Betts anaisbetts

View GitHub Profile
public class DropRepoViewModel : ReactiveObject, IDropRepoViewModel
{
public ReactiveAsyncCommand AnalyzeRepo { get; protected set; }
ObservableAsPropertyHelper<string> _CurrentRepoPath;
public string CurrentRepoPath { get { return _CurrentRepoPath.Value; } }
ObservableAsPropertyHelper<Dictionary<string, HeuristicTreeInformation>> _RepoAnalysis;
public Dictionary<string, HeuristicTreeInformation> RepoAnalysis { get { return _RepoAnalysis.Value; } }
using System;
using System.Reactive.Linq;
using Gtk;
using ReactiveUI;
using ReactiveUI.Routing;
namespace GitHub
{
public partial class MainWindow : Gtk.Window, IScreen
{
@anaisbetts
anaisbetts / mustache.cs
Created May 19, 2012 21:51
Using Mustache to generate C# code
using System;
using ReactiveUI;
using ReactiveUI.Xaml;
using ReactiveUI.Routing;
namespace {{projectName}}.ViewModels
{
{{#interfaces}}
{{definition}}
{{/interfaces}}
public class ViewModelRenderer : IEnableLogger
{
public string RenderViewModel(string interfaceCode)
{
var tree = SyntaxTree.ParseCompilationUnit(interfaceCode, "foo.cs");
var root = tree.GetRoot(new CancellationToken());
if (!root.ChildNodes().Any()) {
throw new ArgumentException("Compilation failed or code is badly formatted");
}

Data Miner

GitHub has lots of data. User data, repository data, event data, you name it. We need someone to aggregate it, query it, and report back to us really interesting things to help better serve our community. Being a number geek that realizes R isn’t just a letter and loves Hadoop is great, but you also have to be able to communicate well within our team.

Our data is stored in a variety of formats such as MySQL, Redis, MongoDB, Riak, and Graphite, so knowledge of SQL and NoSQL databases and their associated querying languages would be useful.

We’d love if you’d work out of our San Francisco office, and we’ll pay to help you move. GitHub is a chance for you to come work with highly skilled, highly motivated professionals that are determined to build the best developer tools on the planet.

We provide an excellent compensation package: health, vision, and dental benefits + HSA contributions, competitive salary, and an open and friendly work environment. Read more about how GitHub works here: https:

@anaisbetts
anaisbetts / the original guy used autocrlf false
Created May 27, 2012 06:58
.gitattributes to solve your problems
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
1 ./Source/TestSupport/exportenv.sh
3 ./Documentation/README.txt
8 ./Source/TestSupport/cleancov.sh
9 ./Documentation/Makefile
10 ./Source/OCHamcrest-Prefix.pch
13 ./Source/MakeDocumentation.sh
17 ./Examples/CustomDateMatcher/IsGivenDayOfWeek.h
17 ./Source/Tests/Collection/FakeWithoutCount.h
18 ./Source/TestSupport/fixCoverage.c
19 ./Source/Core/Helpers/HCRequireNonNilObject.h
IObservable<SomeResult> CalculateSomeStuff(SomeStuff anItem)
{
}
// Do work on 4 threads at a time
someListOfStuff.ToObservable()
.Select(x => Observable.Defer(() => CalculateSomeStuff(x)))
.Merge(4)
.ToList()
// Sum total of code required to update your app using NSync
var updateManager = new UpdateManager("MyCoolApp", "http://mycoolapp.com/update");
updateManager.UpdateApp()
.Subscribe(
x => Console.WriteLine("Update worked! Now at {0}", x.Version),
ex => Console.WriteLine("No Dice! {0}", ex);