This file contains 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 { | |
Injectable, | |
Injector, | |
ComponentFactoryResolver, | |
EmbeddedViewRef, | |
ApplicationRef | |
} from '@angular/core'; | |
@Injectable() | |
export class DomService { |
This file contains 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; | |
using System.Security.Cryptography; | |
class HKDF | |
{ | |
public byte[] hash { get; set; } | |
private readonly HashAlgorithmName algorithm; | |
private readonly HMAC hmac; | |
private readonly int digestLength; |
This file contains 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
sudo apt-get remove \ | |
aisleriot \ | |
brltty \ | |
duplicity \ | |
empathy \ | |
empathy-common \ | |
example-content \ | |
gnome-accessibility-themes \ | |
gnome-contacts \ | |
gnome-mahjongg \ |
This file contains 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
// Ref: http://www.codenutz.com/https-redirect-asp-net-core-using-owin-middleware/ | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Builder; | |
namespace SomeNamespace | |
{ | |
public class HttpsRedirectMiddleware { | |
This file contains 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
/** | |
* Read an EBML tag header or length and return their respective values into | |
* single numbers. | |
* | |
* @example | |
* var tagHeader = new Uint8Array([0x1A, 0x45, 0xDF, 0xA3, 0x01, 0x00, 0x00, | |
* 0x00, 0x00, 0x00, 0x00, 0x1F]); | |
* var tagId = readVariableInt(tagHeader, 4, 0); | |
* console.log('The current tag ID is: ', tagId.value, ', skipping ', tagId.size, ' bytes.'); | |
* // The current tag ID is: 172351395, skipping 4 bytes. |