Skip to content

Instantly share code, notes, and snippets.

View rarous's full-sized avatar
💭
I may be slow to respond.

Aleš Roubíček rarous

💭
I may be slow to respond.
View GitHub Profile
#region IDisposable Members
public static void Dispose()
{
container.Dispose();
}
#endregion
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using NSubstitute;
using Xunit;
namespace MultiConnector.Connectors
{
public class WebConnectorTests
{
using System;
using System.Security;
using System.Web.Mvc;
using NSubstitute;
using Xunit;
namespace MultiConnector.Web
{
using Auth;
using Modules.Authentication;
describe("StringCalculator", function () {
describe("Given empty strings", function(){
it('Should return 0', function(){
expect(calculate("")).toBe(0);
});
});
describe("Given any positive number", function(){
it('Should return given number', function(){
return connectorType.
GetCustomAttribute<ConfigurationNameAttribute>(inherit: true).
ToMaybe().
Select(x => x.Name).
Return(@default: connectorType.Name);
Hi Ales,
Since apparently the whole company knows that you are leaving soon, can I hear it officially from you?
Thank you, Iavor
public class FormReaders
{
const string SlovakConnectors = "MultiConnector.Connectors.Svk.*.dll";
public static IEnumerable<object[]> Connectors
{
get
{
var currentDir = Path.GetFullPath(".");
return from file in Directory.EnumerateFiles(currentDir, SlovakConnectors)
function enableValidation(selector) {
$(selector).find('input').prop('disabled', false);
}
function disableValidation(selector) {
$(selector).find('input').prop('disabled', true);
}
$('#fields').
on('show.bs.tab', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
@rarous
rarous / gist:8279687
Created January 6, 2014 08:05
Errata Příběh strýčka Martina
253 - "najednou se nemám kontakt" - čekal bych "že" místo "se"
653 - "Chtěl jsem něco dodat" - čekal bych ženský rod
757 - "takže opevněný přístup pro k ní mohl" - "pro" je tam navíc
1825 - "Niuunburg? vydechal jsem překvapeně"
2887 - "A pak tma přišla. Bitva netrvala než pár minut." - čekal bych tam "déle"
3462 - "Jenom kobinuješ a procházíš informační stopy v prohnanci" - "kombinuješ", "protonanci"
let FizzBuzz n convert =
[1..n] |> List.map convert |> String.concat ","
let (|DivizableBy|_|) divizor i =
if i % divizor = 0 then Some() else None
let NumberToString = function
| DivizableBy 3 & DivizableBy 5 -> "FizzBuzz"
| DivizableBy 3 -> "Fizz"
| DivizableBy 5 -> "Buzz"