I hereby claim:
- I am jeroenheijmans on github.
- I am jeroenheijmans (https://keybase.io/jeroenheijmans) on keybase.
- I have a public key ASAzXzBDLZAU_aCj3dB_dN4cDqCTyka3DSPFCMK-0hMBxwo
To claim this, I am signing this object:
{ | |
"id": "5960b8fe99b1151dc82b6cb8", | |
"name": "LPIC-1 101 Study Guide", | |
"desc": "", | |
"descData": null, | |
"closed": false, | |
"idOrganization": null, | |
"invited": false, | |
"pinned": false, | |
"starred": false, |
I hereby claim:
To claim this, I am signing this object:
/* DISCLAIMER: | |
* This code is pure adhoc magic. NO WARRANTY or guarantees or | |
* whatsoever! Use at your own risk!! | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace CsharpBuddy |
<# | |
# It can be called like this: | |
$url ="http://localhost:12345/home/upload" | |
$form = @{ description = "Test 123." } | |
$pwd = ConvertTo-SecureString "s3cr3t" -AsPlainText -Force | |
$creds = New-Object System.Management.Automation.PSCredential ("john", $pwd) | |
Get-ChildItem *.txt | Send-MultiPartFormToApi $url $form $creds -Verbose -WhatIf | |
#> |
// Formatter using "dd-MM-yyyy" string format: | |
// See: https://ng-bootstrap.github.io/#/components/datepicker/api#NgbDateParserFormatter | |
// | |
export class NgbDateStringParserFormatter extends NgbDateParserFormatter { | |
parse(value: string): NgbDateStruct { | |
if (!value) { return null; } | |
const parts = value.trim().split('-'); | |
return { |
// Usage: | |
// { provide: OAuthStorage, useValue: decoratedStorage }, | |
const decoratedStorage: OAuthStorage = { | |
getItem(key) { | |
const data = localStorage.getItem(key); | |
console.warn('get', key, data ? data.substring(0, 25) : data); | |
return data; | |
}, | |
setItem(key, data) { |
choco install adobereader -y | |
choco install googlechrome -y | |
choco install firefox -y | |
choco install 7zip -y | |
choco install notepadplusplus -y | |
choco install git -y | |
choco install putty -y | |
choco install nodejs -y | |
choco install skype -y | |
choco install sysinternals -y |
import { OAuthErrorEvent } from 'angular-oauth2-oidc'; | |
// ... | |
this.authService.events.subscribe(event => { | |
if (event instanceof OAuthErrorEvent) { | |
console.error(event); | |
} else { | |
console.warn(event); | |
} |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.2</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore.App" /> | |
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" /> |
import { Subject } from 'rxjs'; | |
import { Destroyable } from './destroyable.component'; | |
class TestableDestroyable extends Destroyable { } | |
describe('Destroyable', () => { | |
it('should construct with observable', () => { | |
const component = new TestableDestroyable(); | |
expect(component.destroyed$ instanceof Subject).toBeTruthy(); | |
}); |