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
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
// 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
# | |
# 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
GET / HTTP/1.1 | |
X-Forwarded-Proto: http | |
X-Forwarded-Port: 80 | |
X-Amzn-Trace-Id: Root=1-5c7628a8-84d63ad8fb4fa07ad8752c46 | |
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 | |
Accept: */* | |
Accept-Encoding: gzip | |
X-Forwarded-For: 71.6.232.4 |
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 "cp949_to_utf8.h" | |
#include <cstdlib> | |
CP949_to_UTF8_Length | |
cp949_to_utf8_length(const char* cp949_data, size_t num_cp949_bytes) | |
{ | |
CP949_to_UTF8_Length result{}; | |
for (size_t i = 0; i < num_cp949_bytes; ++i) | |
{ |
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
$PythonPath = Resolve-Path '~\AppData\Local\Programs\Python\Python36' | |
$ScriptsPath = Join-Path $PythonPath 'Scripts' | |
if ($env:Path.Split(';') | Select-String -Pattern $PythonPath -SimpleMatch) | |
{ | |
exit 0 | |
} | |
$env:Path += ';' + $PythonPath | |
$env:Path += ';' + $ScriptsPath |
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
[user] | |
email = noreply@anonymous | |
name = noname | |
[core] | |
editor = code --wait | |
autocrlf = false | |
pager = diff-so-fancy | less --tabs=4 -RFX | |
[commit] | |
cleanup = scissors | |
[merge] |
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
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.unstage 'reset HEAD --' | |
git config --global alias.last 'log -1 HEAD' | |
git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold red)%h%C(reset) : %C(bold green)(%ai)%C(reset) - %C(cyan)%an <%ae>%C(reset)%C(bold yellow)%d%C(reset)%n%n%w(90,1,2)%C(white)%B%C(reset)%n'" | |
git config --global alias.lg1 "log --graph --abbrev-commit --decorate --format=format:'%C(bold red)%h%C(reset) : %C(bold green)(%ai)%C(reset) - %C(cyan)%an <%ae>%C(reset)%C(bold yellow)%d%C(reset)%n%n%w(90,1,2)%C(white)%B%C(reset)%n' --oneline" |
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
$GOPATH = 'C:\BlahBlahBlah\Blah' | |
$GOPATH_BIN = "$GOPATH\bin" | |
$env:GOPATH = $GOPATH | |
if ($env:Path.IndexOf($GOPATH_BIN, [StringComparison]::OrdinalIgnoreCase) -lt 0) | |
{ | |
if (($env:Path.Length -eq 0) -or ($env:Path[$env:Path.Length - 1] -eq ';')) | |
{ | |
$env:Path += "$GOPATH_BIN" |