Skip to content

Instantly share code, notes, and snippets.

Vaccano

Block or report user

Report or block Vaccano

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
@Vaccano
Vaccano / DbContextHelper.cs
Created Dec 11, 2019
Call a query with EF Core's DatabaseFacade
View DbContextHelper.cs
public static class DbContextHelper
{
public static List<T> SqlQueryList<T>(this DatabaseFacade database, string query, Func<Dictionary<string, object>, T> conversionFunction, params SqlParameter[] sqlParameters)
{
var conn = database.GetDbConnection();
conn.Open();
var command = conn.CreateCommand();
command.CommandText = query;
command.Parameters.AddRange(sqlParameters);
var reader = command.ExecuteReader();
@Vaccano
Vaccano / app.html
Last active Jul 19, 2017
Tab Switching Issue
View app.html
<template>
<require from="navbar"></require>
<nav-bar router.bind="router"></nav-bar>
<div class="page-host">
<router-view></router-view>
@Vaccano
Vaccano / app.html
Last active Jul 5, 2017
Disabled Options
View app.html
<template>
<h1>${message}</h1>
<select>
<option repeat.for="option of options" model.bind="option">${option.value}</option>
</select>
</template>
@Vaccano
Vaccano / app.html
Created Jul 5, 2017
DI inheritance
View app.html
<template>
<h1>${message}</h1>
</template>
@Vaccano
Vaccano / Full Error
Created Jun 8, 2017
Service Fabric Issues
View Full Error
Error event: SourceId='System.FM', Property='State'.
Partition is in quorum loss.
UpgradeOrchestrationService 3 3 00000000-0000-0000-0000-000000006000
S/P RD ClusterNode2 Up 131414258329718880
S/S IB ClusterNode1 Down 131414258623460374
P/S RD ClusterNode3 Down 131414258623460375
(Showing 3 out of 3 replicas. Total available replicas: 1.)
@Vaccano
Vaccano / package.json
Created May 30, 2017
Source Map Will not Parse Issue
View package.json
{
"license": "MIT",
"devDependencies": {
"@types/jest": "^19.2.2",
"@types/whatwg-fetch": "^0.0.33",
"aurelia-loader-nodejs": "^1.0.1",
"aurelia-pal-nodejs": "^1.0.0-beta.1.0.0",
"aurelia-tools": "^1.0.0",
"aurelia-webpack-plugin": "^2.0.0-rc.1",
"chai": "^3.5.0",
View karma.conf.js
var webpackConfig = require('./webpack.config');
var path = require('path');
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai', 'sinon'],
files: [
'plugins/log4javascript/log4javascript.js',
@Vaccano
Vaccano / package.json
Created Apr 3, 2017
Vaccano's webpack setup
View package.json
{
"license": "MIT",
"devDependencies": {
"@types/whatwg-fetch": "^0.0.33",
"aurelia-tools": "^1.0.0",
"aurelia-webpack-plugin": "^2.0.0-rc.1",
"chai": "^3.5.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^3.2.4",
"css-loader": "^0.27.3",
@Vaccano
Vaccano / cached-route-loader.ts
Last active Mar 9, 2017
Aurelia Cached Routing
View cached-route-loader.ts
import {autoinject} from 'aurelia-dependency-injection';
import {CompositionEngine, CompositionContext, ViewEngine} from 'aurelia-templating';
import {RouteLoader, Router} from 'aurelia-router';
import {relativeToFile} from 'aurelia-path';
import {Origin} from 'aurelia-metadata';
import {ViewModelCache} from '../../../src/cache/screen-cache/view-model-cache';
import {ViewCache} from '../../../src/cache/screen-cache/view-cache';
@autoinject
@Vaccano
Vaccano / CleanUpForNuget.ps1
Created Feb 27, 2017
Clean up nuget artifacts
View CleanUpForNuget.ps1
# DO NOT CALL THIS DIRECTLY! IT SHOULD ONLY BE CALLED BY THE BUILD SYSTEM.
# IF YOU CALL THIS DIRECTLY then the projects will have all of their nuget references removed.
#
# For the template to be able to install the nuget stuff, it needs it to be in a state as if
# it has never been installed. This script removes:
# • The packages.config files
# • Removes <None Include="packages.config" /> from any csproj files
# • Compiler references that are added by nuget
# • Removes any references that have a hint path that contains '..\packages\
You can’t perform that action at this time.