Skip to content

Instantly share code, notes, and snippets.

Anton Abyzov anton-abyzov

Block or report user

Report or block anton-abyzov

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
View Hola test task (js - ES6, stack and regexp tasks)
- Assume most recent language standard are available (ES6)
- We expect good performance.
- if missing more requirements details, just make reasonable assumptions of
a your own.
- Solution must be simple and compact.
No defensive coding, no comments, no unrequested features.
Only one file 10-20 lines of code
- Work only inside Google Docs: no external editor/IDE/debugger, no copy-paste
to/from such an editor. We must see the flow of how you write the code.
View Transform Web (XML) config in Web app ps1 (specify Microsoft.Web.XmlTransform.dll location in script)
<#
.SYNOPSIS
You can use this script to easly transform any XML file using XDT.
To use this script you can just save it locally and execute it. The script
will download it's dependencies automatically.
#>
[cmdletbinding()]
param(
[Parameter(
Mandatory=$true,
@anton-abyzov
anton-abyzov / StructuremapTests.cs
Created Jan 24, 2016
Structuremap registration via IContainer vs ObjectFactory
View StructuremapTests.cs
using Machine.Specifications;
using NUnit.Framework;
using StructureMap;
namespace StructuremapTests
{
// structuremap version 3.1.6.186, Machine Specification 0.9.3, Machine.Specifications.Should 0.8.0
class Program
{
[Test]
@anton-abyzov
anton-abyzov / SMTests
Created Nov 30, 2015
StructureMap 2.6.4.1 supports lazy initialization
View SMTests
using System;
using NUnit.Framework;
using StructureMap;
namespace StructureMapTests
{
public class SMTests
{
[Test]
public void WillUseLazyInit()
@anton-abyzov
anton-abyzov / 0_reuse_code.js
Created Nov 12, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View src_com_example_smartphoneappdevelopguide_objectoriented_postsystem_Main.java
package com.example.smartphoneappdevelopguide.objectoriented.postsystem;
import com.example.smartphoneappdevelopguide.objectoriented.postsystem.service.Center;
import com.example.smartphoneappdevelopguide.objectoriented.postsystem.town.Address;
import com.example.smartphoneappdevelopguide.objectoriented.postsystem.town.House;
import com.example.smartphoneappdevelopguide.objectoriented.postsystem.town.HouseMap;
import com.example.smartphoneappdevelopguide.objectoriented.postsystem.user.Customer;
public class Main {
@anton-abyzov
anton-abyzov / AutoMapperDefaultBehaviourTests.cs
Last active Nov 10, 2015
Automapper will ignore lacking or excessed props when doing mapping
View AutoMapperDefaultBehaviourTests.cs
/// <summary>
/// Automapper will ignore lacking or excessed props when doing mapping
/// </summary>
public class AutoMapperTests
{
/// <summary>
/// Automapper will ignore outer props of destination entity as it has more props than the source one. Props that are not matched will be
/// populated with default values
/// </summary>
[Test]
@anton-abyzov
anton-abyzov / EFMaterializationTests.cs
Last active Nov 10, 2015
Beware of EF6 (and below) limitations: materialization into domain entity with missing fields
View EFMaterializationTests.cs
public class EFMaterializationTests
{
/// <summary>
/// Domain entity (WcChallengeDomain in our case) should have all properties mentioned on materialization of EF6 and below. In this case optional field Description is missing
/// on materialization (Select with new WcChallengeDomain) and EF doesn't support it
/// </summary>
[Test]
public void EF6WillThrowExcOnMaterializationOfDomainEntityWithMissingField()
{
//arrange
You can’t perform that action at this time.