Skip to content

Instantly share code, notes, and snippets.

View Bak-Jin-Hyeong's full-sized avatar

Bak, Jin Hyeong Bak-Jin-Hyeong

View GitHub Profile
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"
)
import datetime
import itertools
import json
import boto3
REGION = 'us-east-1'
CLUSTER = 'what-the-fuck'
ECS_CLIENT = boto3.client('ecs', REGION)
// 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 || \
@Bak-Jin-Hyeong
Bak-Jin-Hyeong / Hide-Server-Manager-At-Logon.ps1
Created March 5, 2019 07:47
How To Hide Server Manager At Logon
#
# 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
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
@Bak-Jin-Hyeong
Bak-Jin-Hyeong / cp949_to_utf8.cpp
Last active December 18, 2018 02:22
cp949_to_utf8
#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)
{
@Bak-Jin-Hyeong
Bak-Jin-Hyeong / Use-Python36.ps1
Created August 10, 2018 12:12
Add the path of the Python interpreter to the Windows PATH environment variable.
$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
[user]
email = noreply@anonymous
name = noname
[core]
editor = code --wait
autocrlf = false
pager = diff-so-fancy | less --tabs=4 -RFX
[commit]
cleanup = scissors
[merge]
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"
$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"