Skip to content

Instantly share code, notes, and snippets.

View archongum's full-sized avatar
😀

Archon archongum

😀
View GitHub Profile
#!/bin/bash
REGISTRY="3laho3y3.mirror.aliyuncs.com"
FILE_NAME=`basename "$0"`
USAGE="Usage: \n\t$FILE_NAME NAME[:TAG|@DIGEST]\n"
IMAGE=$1
if [ -z $IMAGE ]; then
echo -e $USAGE
#!/usr/bin/env bash
function log_info() {
# Usage: log_info "this is the info log message"
echo "$(date "+%Y-%m-%d %H:%M:%S") [INFO]: $@"
}
# Presto Info
server="10.82.28.143:8080"
catalog="hive"
@archongum
archongum / utlxplan.sql
Created September 4, 2020 03:33
Oracle 19c PLAN_TABLE
rem
rem $Header: rdbms/admin/utlxplan.sql /main/18 2017/05/28 22:46:13 stanaya Exp $ xplainpl.sql
rem
Rem Copyright (c) 1988, 2017, Oracle and/or its affiliates.
Rem All rights reserved.
Rem NAME
REM UTLXPLAN.SQL
Rem FUNCTION
Rem NOTES
Rem BEGIN SQL_FILE_METADATA
import os
import sys
import gzip
from io import BytesIO
import json
import hashlib
import shutil
import requests
import tarfile
import urllib3
#!/bin/bash
if [ -L $0 ] ; then
DIR=$(dirname $(readlink -f $0)) ;
else
DIR=$(dirname $0) ;
fi;
java -jar $DIR/jolt-cli-*.jar $@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Francophonie\Eudic\Customer Info]
"SerialCode"="cracked by Archon"
"TimesLeft3"=dword:000c85e7
"regDate"="2024/1/1 00:00:00"
"LicenseCode"="cracked by Archon"
@archongum
archongum / mat_report.sh
Last active September 26, 2019 03:38
Creates reports(Leak_Suspects, System_Overview, Top_Components) for mat(Memory Analyzer Tools), places in mat root directory.
#!/bin/sh
#
# Bases on 'ParseHeapDump.sh'
#
SCRIPT_NAME=`basename "$0"`
if [ "$#" != "1" ]; then
echo "Usage: ${SCRIPT_NAME} *.hprof"
exit 1
@archongum
archongum / presto_auto_sync_hive_partitions.sh
Created August 27, 2019 07:29
use presto to automatically sync hive partitions
#!/bin/bash
COMMAND_PREFIX="presto-cli --server host:8080 --catalog hive --user hive --execute "
SQL="select table_name from information_schema.tables where table_schema = 'dw' and table_type = 'BASE TABLE' and table_name like 'ods_%'"
GET_TABLES_COMMAND=$COMMAND_PREFIX"\""$SQL"\""
echo $GET_TABLES_COMMAND
for TABLE in `eval $GET_TABLES_COMMAND`
do
TABLE=`echo $TABLE | cut -d '"' -f 2`
@archongum
archongum / dw-presto-cli.sh
Last active August 24, 2019 02:08
presto-cli to support custom parameters
#!/bin/bash
SCRIPT_NAME=`basename "$0"`
function _usage ()
{
cat <<EOF
Usage: $SCRIPT_NAME [OPTIONS]
Options:
-s --server: presto server
@archongum
archongum / consumer.sh
Created December 3, 2018 08:12 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1