This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO | |
openDialog() { | |
const dialogRef = this.dialog.open(DialogResultExampleDialogComponent, { | |
width: '80%', | |
data: this.selected[0] // will show in config.data on the dialog | |
}); | |
dialogRef.afterClosed().subscribe(result => { | |
this.selectedOption = result; | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "ctrl+d", | |
"command": "editor.action.copyLinesUpAction", | |
"when": "editorTextFocus" | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$originalpaths = (Get-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PSModulePath).PSModulePath | |
# Add your new path to below after the ; | |
$newPath=$originalpaths+’;C:\PowerShell\Modules\’ | |
Set-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PSModulePath –Value $newPath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'jsonDate' | |
}) | |
export class JsonDatePipe implements PipeTransform { | |
transform(value: any, args?: any): any { | |
if (value) { | |
return new Date(parseInt(value.substr(6))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -Path "$PSScriptRoot\Serilog.2.1.0\lib\net45\Serilog.dll" | |
Add-Type -Path "$PSScriptRoot\Serilog.Sinks.RollingFile.2.0.0\lib\net45\Serilog.Sinks.RollingFile.dll" | |
Add-Type -Path "$PSScriptRoot\Serilog.Sinks.Console.2.1.0\lib\net45\Serilog.Sinks.Console.dll" | |
Add-Type -Path "$PSScriptRoot\Serilog.Sinks.File.2.2.0\lib\net45\Serilog.Sinks.File.dll" | |
cls | |
$Config = New-Object Serilog.LoggerConfiguration | |
$logPath = "$PSScriptRoot\serilog.log" | |
$fileSize = 1073741824 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using System.Web.Http; | |
using System.Web.OData; | |
using System.Web.OData.Routing; | |
using Web.ODataApi.Views; | |
namespace Web.ODataApi.Controllers | |
{ | |
public class PrismSalesSummaryViewController : ODataController | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeNullIn(prop, obj) { | |
console.info('We dont want nulls..', prop, obj); | |
var pr = obj[prop]; | |
if (pr === null || pr === undefined) { | |
delete obj[prop]; | |
} | |
else if (typeof pr === 'object') { | |
for (var i in pr) { | |
removeNullIn(i, pr) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IStateInherit extends ng.ui.IStateService { | |
$current: IResolvedStateInherit; | |
} | |
interface IResolvedStateInherit extends ng.ui.IResolvedState { | |
data: IUrlDataContainer; | |
} | |
interface IUrlDataContainer { | |
title: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"directory": "lib", | |
"scripts": { | |
"postinstall": "gulp wiredep" | |
} | |
} |