This file contains hidden or 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
function Get-DifferentNugetPackages{ | |
param($path = ".") | |
gci -recurse $path | ? { $_.Name -eq "packages.config" } | | |
% { | |
$result = ([xml](gc $_.FullName)).packages.package | |
$dir_name = $_.Directory.Name | |
$result | %{ new-object PsObject -Property @{ id= $_.id; version = $_.version; project = $dir_name } } | |
} | | |
sort id,version,project | group id | ? { @($_.Group | % { $_.version } | Unique).Count -gt 1 } | % { |
This file contains hidden or 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
# Requires pdfminer, icalendar | |
# both are easy_install'able | |
import itertools, re | |
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter | |
from pdfminer.converter import TextConverter | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage | |
from cStringIO import StringIO | |
from datetime import date, time, datetime, timedelta |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using Funq; | |
using NUnit.Framework; | |
using ServiceStack.IO; | |
using ServiceStack.VirtualPath; | |
namespace ServiceStack.Common.Tests.VirtualPathProvider | |
{ |
This file contains hidden or 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.Diagnostics; | |
using System.Web; | |
using metrics; | |
using metrics.Core; | |
using ServiceStack; | |
[Route("/admin/metrics/all")] | |
class GetAllMetrics { } | |
class MetricsService : IService |
This file contains hidden or 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
internal class A | |
{ | |
public string uid { get; set; } | |
} | |
public static class Class1 | |
{ | |
public static void Run() | |
{ | |
var regexp = new Regex(@"'uid':\s*(?<uid>[0-9]{8}[0-9]+)\s*", RegexOptions.Multiline); |
This file contains hidden or 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.Collections.Generic; | |
using System.Diagnostics; | |
using ServiceStack; | |
using ServiceStack.Auth; | |
namespace Test | |
{ | |
public class CustomAuthUserSession : AuthUserSession | |
{ | |
public string UserId { get; set; } |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using Glimpse.Core.Extensibility; | |
using Glimpse.Core.Framework; | |
using Glimpse.Core.ResourceResult; | |
namespace weListen.Infrastructure | |
{ | |
public class GlimpseServiceLocator : IServiceLocator |
This file contains hidden or 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
# gist: https://gist.github.com/4397792 | |
# Usage: | |
# session = cgd.CgdSession(uid, password) | |
# session.login() | |
# session.load_latest_transactions(account_key) | |
# 'session.known_accounts' is now populated with the initial accounts taken from the login response, | |
# and the data for the 'account_key' account. | |
# session.load_latest_transactions(account_key) loads the latest transactions and balances for a given account. |
This file contains hidden or 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
# gist: https://gist.github.com/4397669 | |
import logging, requests, simplejson | |
from datetime import datetime | |
dthandler = lambda obj: obj.isoformat() if isinstance(obj, datetime) else None | |
def dumps(obj): | |
return simplejson.dumps(obj, use_decimal=True, default=dthandler) | |
l = logging.getLogger("ravendb") |
This file contains hidden or 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
internal class DeobfuscateString | |
{ | |
private readonly string[] _args; | |
private MethodInfo _method; | |
private string _assemblyPath; | |
private DeobfuscateString(string[] args) | |
{ | |
_args = args; | |
} |