function UsefulDecorator<T extends new (...args) => any>(
BaseClass: T,
): T {
return class _usefulClass extends BaseClass {
private _someStore: typeof SomeStore = SomeStore;
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
# ------------------------- | |
# NVIDIA X11 Config | |
# path: /etc/X11/xorg.conf.d/10-nvidia.conf | |
# ------------------------- | |
Section "OutputClass" | |
Identifier "nvidia" | |
Driver "nvidia" | |
Option "AllowEmptyInitialConfiguration" | |
Option "AllowExternalGpus" "True" |
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
public class IdentifierMasking | |
{ | |
private static byte[] _key; | |
public IdentifierMasking(byte[] key = null) | |
{ | |
_key = key ?? Sodium.SecretBox.GenerateKey(); | |
} | |
public string RevealIdentifier(string hidden) |
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.IdentityModel.Tokens.Jwt; | |
using System.Threading.Tasks; | |
using Microsoft.IdentityModel.Protocols; | |
using Microsoft.IdentityModel.Protocols.OpenIdConnect; | |
using Microsoft.IdentityModel.Tokens; | |
namespace authproxy | |
{ | |
public class TokenValidator |
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
/*--------------------------------------------------------------------------------------------- | |
* Copyright (c) Dolittle. All rights reserved. | |
* Licensed under the MIT License. See LICENSE in the project root for license information. | |
*--------------------------------------------------------------------------------------------*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.Serialization; | |
using System.Text.Encodings.Web; |
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
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddAuthentication(options => | |
{ | |
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme; | |
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme; | |
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; | |
} | |
.AddCookie(); | |
} |
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
# ---------- | |
# EGPU as Default Config for X11 | |
# Place under (ln -s) /etc/X11/xorg.conf -> /etc/X11/xorg.conf.egpu | |
# Replace busId using lspci -vvv | grep NVIDIA | |
# ---------- | |
Section "Module" | |
Load "modesetting" | |
EndSection |
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
# ------------------------- | |
# NVIDIA X11 Config | |
# path: /etc/X11/xorg.conf.d/10-nvidia.conf | |
# ------------------------- | |
Section "OutputClass" | |
Identifier "nvidia" | |
MatchDriver "nvidia-drm" | |
Driver "nvidia" | |
Option "AllowEmptyInitialConfiguration" |
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
#!/bin/bash | |
# ---------------------- | |
# cURL webpage n-iters useful for Chaos Testing, DDoS, Analytics Spiking | |
# Author github@sar assumes no responsibility for your actions | |
# ---------------------- | |
read -p "Enter direct URL for cURL page loop: " url | |
read -p "Max loop iterations: " iter | |
counter=1 |
Enable GPU accelerated content decoding and DOM compositor rendering on Linux. For more details refer to docs.
Properties can be set by navigating to about:config.
gfx.webrender.all=true
layers.mlgpu.enabled=true