This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>mount_ntfs_3g</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>KeepAlive</key> | |
<false/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace FastGetMethodBenchmark | |
{ | |
public class FastGetMethodVsGetMethod | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Linq; | |
using NUnit.Framework; | |
public class CachingEnumerable<T> : IEnumerable<T>, IDisposable | |
{ | |
List<T> _cache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IQuery<TCriteria, TResult> { TResult Execute(TCriteria criteria); } | |
class BooksWithISBN { public string ISBN { get; set; } } | |
class BooksWithISBNQuery : IQuery<BooksWithISBN, IEnumerable<Book>> { | |
public IEnumerable<Book> Execute(BooksWithISBN criteria) { | |
return session.Query<Book>().Where(b => b.ISBN == criteria.ISBN).AsEnumerable(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$file = Get-Content ".\bower.json" | |
$component = "$file" | ConvertFrom-Json | |
$jquery = $component.dependencies.jquery.replace('>=', '') | |
echo "<?xml version=""1.0""?> | |
<package xmlns=""http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd""> | |
<metadata> | |
<version>$($component.version).$env:BUILD_NUMBER</version> | |
<authors>Chris Wanstrath, Joshua Peek</authors> | |
<owners>hazzik</owners> | |
<licenseUrl>https://github.com/defunkt/jquery-pjax/blob/master/LICENSE</licenseUrl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading; | |
class Program | |
{ | |
static void Main() | |
{ | |
for (int i = 0; i < 1000; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Assumes that you tag versions with the version number (e.g., "1.1") | |
# and then the build number is that plus the number of commits since | |
# the tag (e.g., "1.1.17") | |
DESCRIBE=`git describe --tags --always` | |
# increment the build number (ie 115 to 116) | |
VERSION=`echo $DESCRIBE | awk '{split($0,a,"-"); print a[1]}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BlogML import script originally sourced from: | |
# https://github.com/philippkueng/philippkueng.github.com/tree/30ef1570f06d33938b18d5eee7767d6641b9a779/source/_import | |
# Best post I could find about how to use it was here: | |
# http://philippkueng.ch/migrate-from-blogengine-dot-net-to-jekyll.html | |
# | |
# how to install | |
# -------------- | |
# mkdir source/_importer | |
# cp blogml.rb to the source/_importer/ you created above | |
# cp your BlogML.xml to the same source/_importer/ directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
ec = config --global -e | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
cob = checkout -b | |
cm = !git add -A && git commit -m | |
save = !git add -A && git commit -m 'SAVEPOINT' | |
wip = !git add -u && git commit -m "WIP" | |
undo = reset HEAD~1 --mixed | |
amend = commit -a --amend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RestClient : DynamicObject | |
{ | |
private readonly string _address; | |
public RestClient(string address) | |
{ | |
this._address = address; | |
} | |
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) |
NewerOlder