Skip to content

Instantly share code, notes, and snippets.

@Vaccano
Vaccano / karma.conf.js
Last active April 25, 2017 21:33
Config Files
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 April 3, 2017 20:13
Vaccano's webpack setup
{
"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 March 9, 2017 17:47
Aurelia Cached Routing
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 February 27, 2017 18:03
Clean up nuget artifacts
# 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\
@Vaccano
Vaccano / The Data Inserts for Both Tables
Last active January 3, 2017 22:59
Tables for Origin -> State relationship
USE [EnterpriseTemplate]
GO
INSERT [template].[State] ([StateId], [Abbreviation], [Name]) VALUES (1, N'AL', N'Alabama')
GO
INSERT [template].[State] ([StateId], [Abbreviation], [Name]) VALUES (2, N'AK', N'Alaska')
GO
INSERT [template].[State] ([StateId], [Abbreviation], [Name]) VALUES (3, N'AZ', N'Arizona')
GO
INSERT [template].[State] ([StateId], [Abbreviation], [Name]) VALUES (4, N'AR', N'Arkansas')
GO
@Vaccano
Vaccano / Origin.cs
Created December 23, 2016 00:36
Origin And State Entities
namespace DataAccessLayer
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("template.Origin")]
public partial class Origin
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 / webpack.config.js
Created May 26, 2016 20:25
Webpack for Aureila
var path = require('path');
var AureliaWebpackPlugin = require('aurelia-webpack-plugin');
var ProvidePlugin = require('webpack/lib/ProvidePlugin');
module.exports = {
resolve: {
extensions: ['', '.js', '.ts'],
alias: {
'breeze': 'breeze-client/build/breeze.debug'
//,'src': path.join(__dirname, 'src')
public class RawPrinterHelper
{
// Structure and API declarions:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public class DOCINFOA
{
[MarshalAs(UnmanagedType.LPStr)]
public string pDocName;
[MarshalAs(UnmanagedType.LPStr)]
public string pOutputFile;
@Vaccano
Vaccano / karma.config.js
Created April 22, 2016 20:49
Configs For "Require Missing" issues
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',