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
# | |
# How To Hide Server Manager At Logon | |
# https://blogs.technet.microsoft.com/rmilne/2014/05/30/how-to-hide-server-manager-at-logon/ | |
# | |
Get-Item HKCU:\Software\Microsoft\ServerManager | |
Get-ItemProperty -Path HKCU:\Software\Microsoft\ServerManager -Name DoNotOpenServerManagerAtLogon | select DoNot OpenServerManagerAtLogon | Ft –AutoSize | |
New-ItemProperty -Path HKCU:\Software\Microsoft\ServerManager -Name DoNotOpenServerManagerAtLogon -PropertyType DWORD -Value "0x1" –Force |
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
// https://stackoverflow.com/questions/4239993/determining-endianness-at-compile-time | |
#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \ | |
defined(__BIG_ENDIAN__) || \ | |
defined(__ARMEB__) || \ | |
defined(__THUMBEB__) || \ | |
defined(__AARCH64EB__) || \ | |
defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) | |
// It's a big-endian target architecture | |
#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || \ |
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 datetime | |
import itertools | |
import json | |
import boto3 | |
REGION = 'us-east-1' | |
CLUSTER = 'what-the-fuck' | |
ECS_CLIENT = boto3.client('ecs', REGION) |
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
package main | |
import ( | |
"fmt" | |
"github.com/aws/aws-sdk-go-v2/aws/awserr" | |
"github.com/pkg/errors" | |
"go.uber.org/zap" | |
"go.uber.org/zap/zapcore" | |
"runtime" | |
) |
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
#include "get_first_mac_address_windows.h" | |
#include <vector> | |
#include <WinSock2.h> | |
#include <ws2ipdef.h> | |
#include <WS2tcpip.h> | |
#include <iphlpapi.h> | |
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
#include "CoarseClock.h" | |
#if defined(_WIN32) || defined(_WIN64) | |
#if defined(_M_IX86) || defined(_M_AMD64) | |
#include <Windows.h> |
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
#ifndef SPLITMIX64__H__ | |
#define SPLITMIX64__H__ | |
#include <cstdint> | |
constexpr uint64_t splitmix64_stateless(uint64_t previous_state) noexcept | |
{ | |
uint64_t z = previous_state + 0x9E3779B97F4A7C15ull; | |
z = (z ^ (z >> 30)) * 0xBF58476D1CE4E5B9ull; | |
z = (z ^ (z >> 27)) * 0x94D049BB133111EBull; |
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
#ifndef LITERALSTRINGVIEW__H__ | |
#define LITERALSTRINGVIEW__H__ | |
#include <cassert> | |
#include <string_view> | |
class LiteralStringViewHolder; |
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
$invocation = (Get-Variable MyInvocation).Value | |
$invocationDir = Split-Path $invocation.MyCommand.Path | |
Get-ChildItem $invocationDir | ForEach-Object { | |
$p = (Join-Path -Path $_.FullName -ChildPath '.git') | |
if (Test-Path -Path $p) { | |
Write-Host "git --git-dir="${p}" fetch --prune --all" | |
git --git-dir="${p}" fetch --prune --all | |
} | |
} |
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 Get-RegistryValue | |
{ | |
param | |
( | |
[parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] $Path, | |
[parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] $Value | |
) | |
if (Test-Path $Path) | |
{ |