Skip to content

Instantly share code, notes, and snippets.

View anaisbetts's full-sized avatar

Ani Betts anaisbetts

View GitHub Profile
using System;
using System.Diagnostics;
using System.Reactive.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Input;
using System.Windows.Interactivity;
using System.Windows.Interop;
using GitHub.Helpers;
using ReactiveUI;
0:012> kn
# ChildEBP RetAddr
00 085ee484 74d19536 KERNELBASE!GetFileAttributesW+0x71
01 085ee49c 6f5de8e8 KERNELBASE!GetFileAttributesA+0x25
02 085ee4ac 6f60ab82 MSVCR100!_access_s+0x39
03 085ee4c8 585d8df2 MSVCR100!_mktemp_s+0xc6
04 085ee4dc 585b99c9 git2!p_mkstemp+0x22 [e:\windows\libgit2sharp\libgit2\src\win32\posix_w32.c @ 368]
05 085ee4f0 585b92e4 git2!git_futils_mktmp+0x49 [e:\windows\libgit2sharp\libgit2\src\fileops.c @ 45]
06 085ee518 585c1576 git2!git_filebuf_open+0x104 [e:\windows\libgit2sharp\libgit2\src\filebuf.c @ 202]
07 085ee590 585bfd3e git2!loose_backend__stream+0xf6 [e:\windows\libgit2sharp\libgit2\src\odb_loose.c @ 799]
/// <summary>
/// Launches a dialog to browse for a dialog
/// </summary>
/// <param name="selectedPath">The path that should be selected when the dialog is open.</param>
/// <returns>Returns the path if a folder is selected and user clicks OK. Otherwise returns null.</returns>
public static string BrowseForFolder(string selectedPath)
{
if (Environment.OSVersion.Version.Major < 6)
{
return BrowseForFolderIfOperatingSystemIsSad(selectedPath);
PS E:\Windows\GitHub.Tests.ConsoleApp\bin\Release> .\GitHub.Tests.ConsoleApp.exe E:\CSharpPublicRepos\Nancy
Report for E:\CSharpPublicRepos\Nancy
{"RelativePath":null,"IsBinaryFile":false,"LineEndingType":0,"IsInconsistent":true,"TextEncodingAsString":"Unicode (UTF-8)"}
Bad Line Endings (3.01 %% of entries):
- .gitignore => Posix
- readme.md => Posix
- src\Nancy.Tests\Unit\ModelBinding\DefaultBodyDeserializers\XmlBodyDeserializerfixture.cs => Posix
- src\Nancy\Diagnostics\Resources\backbone-min.js => Posix
- src\Nancy\Diagnostics\Resources\handlebars.js => Posix
- src\Nancy\Diagnostics\Resources\jquery-1.7.1.min.js => Posix
Out of 284 popular C# Repos:
- 184 (64.7%) have AutoCRLF = true, 101 (%) have AutoCRLF = false
- 245 (86.2%) are inconsistent in some way (either CRLF or Encodings)
- 284 (100%) are primarily UTF8
- 128 (45.1%) have files in multiple encodings

NSync: It's like ClickOnce but Works™

What Do We Want?

Deployment and Updates for Desktop applications blow. ClickOnce almost works, but has some glaring bugs that don't seem like they'll ever be fixed. So let's own our own future and build a new one.

Windows apps should be as fast and as easy to install and update as apps like Google Chrome. From an app developer's side, it should be really

$dontcare = git fetch origin --prune
$branches = git branch -a --merged |
?{$_ -match "remotes\/origin"} |
?{$_ -notmatch "\/master"} |
%{$_.Replace("remotes/origin/", "").Trim() }
if (-not $branches) {
echo "No merged branches detected"
exit 0
}
paul@jupiter:~/Desktop% git clone https://github.com/glennblock/require-analyzer
Cloning into 'require-analyzer'...
remote: Counting objects: 761, done.
remote: Compressing objects: 100% (407/407), done.
remote: Total 761 (delta 362), reused 675 (delta 277)
Receiving objects: 100% (761/761), 107.49 KiB, done.
Resolving deltas: 100% (362/362), done.
paul@jupiter:~/Desktop% cd require-analyzer
paul@jupiter:~/Desktop/require-analyzer% git remote add upstream https://github.com/nodejitsu/require-analyzer.git
paul@jupiter:~/Desktop/require-analyzer% git fetch upstream
paul@jupiter:~/GitHub/SignalR% wc -l **/*.cs | grep 'total'
13141 total
paul@jupiter:~/GitHub/SignalR% wc -l **/*.js | grep 'total'
94225 total