Skip to content

Instantly share code, notes, and snippets.

Pawel Pabich pawelpabich

Block or report user

Report or block pawelpabich

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pawelpabich
pawelpabich / gist:1971234
Created Mar 4, 2012
Normalizes MbUnit test results so they can be viewed in Visual Studio
View gist:1971234
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Linq;
namespace MbUnitTestResultNormalizer
{
public class TestResultNormalizer
{
@pawelpabich
pawelpabich / gist:1985843
Created Mar 6, 2012
Windows 8 Developer Preview jQuery hack
View gist:1985843
msWWA.execUnsafeLocalFunction(function () {
self[i].innerHTML = value;
});
View gist:2300832
public class UnitOfWork : IUnitOfWork, IDisposable
{
private readonly MyContext context;
private bool isRolledback;
private readonly TransactionScope transactionScope;
public UnitOfWork(MyContext context)
{
this.context = context;
isRolledback = false;
@pawelpabich
pawelpabich / LogModule.cs
Created Jul 7, 2012
Log4Net and NLog modules for Autofac
View LogModule.cs
using System;
using System.Linq;
using Autofac;
using Autofac.Core;
using NLog;
using log4net;
using LogManager = NLog.LogManager;
namespace AutofacIdea
{
@pawelpabich
pawelpabich / html.html
Created Oct 30, 2012
Java Script unit testing with YUI Test and Jack mocking framework
View html.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title>
<script src="Scripts/Form.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"> </script>
</head>
<body>
<form method="post" action="">
<p>Why did you decided to submit this form?</p>
<fieldset><legend>Reasons</legend>
<ul>
@pawelpabich
pawelpabich / test.html
Created Oct 30, 2012
Java Script unit testing with YUI Test and Jack mocking framework
View test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Untitled Page</title>
<link rel="stylesheet" type="text/css" href="http://developer.yahoo.com/yui/3/assets/yui.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts-min.css" />
<script src="http://yui.yahooapis.com/3.1.1/build/yui/yui-min.js" type="text/javascript"></script>
<script src="Scripts/jack.js" type="text/javascript"></script>
<script src="Scripts/Form.js" type="text/javascript"></script>
<script src="Scripts/UnitTests.js" type="text/javascript"></script>
</head>
@pawelpabich
pawelpabich / test.js
Created Oct 30, 2012
Java Script unit testing with YUI Test and Jack mocking framework
View test.js
/// <reference path="jack.js" />
JST = JSUnitTesting;
YUI().use("node", "console", "test", function (Y) {
var validation_tests = new Y.Test.Case({
name: "Validation tests",
"validation should fail when both custom and
@pawelpabich
pawelpabich / code.js
Created Oct 30, 2012
Java Script unit testing with YUI Test and Jack mocking framework
View code.js
JSUnitTesting = {
getPredefinedReasons: function () {
var values = [];
$("input[type='checkbox']").each(function () {
values.push($(this).is(":checked"));
});
return values;
},
getCustomReason: function () {
return $("input[type='text']:first").val();
@pawelpabich
pawelpabich / InputData.txt
Created Jan 1, 2013
Word count using Hive
View InputData.txt
Hello
World
Bye
World
View ExtensibleDynamicObject
public class ExtensibleDynamicObject : DynamicObject
{
private readonly Dictionary<string, object> data;
public ExtensibleDynamicObject()
{
data = new Dictionary<string, object>();
}
public override bool TrySetMember(SetMemberBinder binder, object value)
You can’t perform that action at this time.