Skip to content

Instantly share code, notes, and snippets.

Working from home

Attila Hajdrik attilah

Working from home
View GitHub Profile
View gist:6c7188fc93a93d0fb31f
I've Win8.1, VS 2013 with Update 2 RC.
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error, with 2 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.
1) Could not finishing composing object of type 'Nitra.VisualStudio.NitraGlobalConfig'. The import ' ContractName Microsoft.VisualStudio.Utilities.IContentTypeRegistryService RequiredTypeIdentity Microsoft.VisualStudio.Utilities.IContentTypeRegistryService' was not satisfied. Resulting in: Cannot get export 'Nitra.VisualStudio.NitraGlobalConfig (ContractName="Nitra.VisualStudio.INitraGlobalConfig")' from part 'Nitra.VisualStudio.NitraGlobalConfig'. Element: Nitra.VisualStudio.NitraGlobalConfig (ContractName="Nitra.VisualStudio.INitraGlobalConfig") --> Nitra.VisualStudio.NitraGlobalConfig Resulting in: Cannot set import 'Nitra.VisualStudio.ViewCreationListener.NitraGlobalConfig (ContractName="Nitra.VisualStudio.INitraGlobalConfig"
attilah / EPR.ps1
Last active Aug 29, 2015
How to enable package restore from a script on a solution from StudioShell console
View EPR.ps1
Add-Type -AssemblyName NugetConsole.Host.PowerShell
# These functions are from Nuget test sources, the key here is to get access to an IVsPackageSourceProvider instance.
function Get-Interface
View gist:c64b82fee23473ee7fff
class ModelRoot {
IEnumerable<ImportStatement> ImportStatement { get; set; }
IEnumerable<ModelMember> ModelMembers { get; set; }
attilah / Add-New-Config
Created Jul 28, 2014
Add New Config view StudioShell
View Add-New-Config
$solution = Get-Item DTE:\Solution
$solution.SolutionBuild.SolutionConfigurations.Add("My New Config", "Debug", $True)
attilah / cleanData override
Created Aug 1, 2014
Angular 1.2+, jQuery 2.1+, jQuery UI 1.x+ include order
View cleanData override
If you're using Angular 1.2+, jQuery 2.1+, jQuery UI 1.x+ together, you can easily get a weird error like this:
TypeError: undefined is not a function
at replaceWith (
at applyDirectivesToNode (
at compileNodes (
at compileNodes (
at compile (
at Scope.$eval (
attilah / gist:2fa74ee35db0b52d6a1b
Created Jul 13, 2015
Shopify Json construction before sending on the wire
View gist:2fa74ee35db0b52d6a1b
I need to construct the following JSON in C#, it will be sent on the wire afterwards:
"custom_collection": {
"title": "IPods",
"collects": [
"product_id": 921728736
attilah / gist:d7585632651b3f3cd232
Created Nov 30, 2015
Microsoft.Extensions.DependencyInjection.Abstractions nuget package install fails on .Net 4.5
View gist:d7585632651b3f3cd232
PM> Install-Package microsoft.Extensions.DependencyInjection.Abstractions -pre
Attempting to gather dependencies information for package 'microsoft.Extensions.DependencyInjection.Abstractions.1.0.0-rc1-final' with respect to project 'DINugetTest', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'microsoft.Extensions.DependencyInjection.Abstractions.1.0.0-rc1-final' with DependencyBehavior 'Lowest'
Resolving actions to install package 'microsoft.Extensions.DependencyInjection.Abstractions.1.0.0-rc1-final'
Resolved actions to install package 'microsoft.Extensions.DependencyInjection.Abstractions.1.0.0-rc1-final'
Adding package 'System.ComponentModel.4.0.1-beta-23516' to folder 'W:\Workspaces\Dev\DINugetTest\packages'
Added package 'System.ComponentModel.4.0.1-beta-23516' to folder 'W:\Workspaces\Dev\DINugetTest\packages'
Added package 'System.ComponentModel.4.0.1-beta-23516' to 'packages.config'
Successfully installed 'System.ComponentModel 4.0.1-beta-23516' to DINugetTest
View gist:42a8f62ce28fe83bd770
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace MetaOrleans
class Program
View gist:bc402005fd352c8cf446d2ecfe133450
C:\0>yarn test
yarn test v0.18.1
$ jest --config=exercises/jest.config.json
FAIL exercises\01_block-scoping.test.js
● can be used in place of `var`
ReferenceError: bandName is not defined
at Object.<anonymous>.test (exercises\01_block-scoping.test.js:5:10)
attilah / Directory.Build.props
Created Mar 18, 2017
Common props with conditions
View Directory.Build.props
<PropertyGroup Condition=" '$(ABC)'=='true' ">