Skip to content

Instantly share code, notes, and snippets.

View ziozzang's full-sized avatar

Jioh L. Jung ziozzang

View GitHub Profile
@ziozzang
ziozzang / SNIProxy.Test.Result.md
Created February 17, 2019 23:59
Korean SNI Censorship avoid Testing with https://github.com/ziozzang/SimpleSNIProxy

Notice

  • This code is over 4years. and works well in recent blocking issue. :)
  • This is for testing only. about techincal issue.
  • I masked URL from result. :)

TL;DR

  • Testing Result via Simple SNI Proxy Server by me.
  • This server is not intended to by-pass SNI censorship in korea. as you see, this code is 4 years old.
@ziozzang
ziozzang / socks-test-with-python.md
Last active February 19, 2019 02:37
socks proxy test using python
pip install PySocks
import urllib2
import socks
from sockshandler import SocksiPyHandler

opener = urllib2.build_opener(SocksiPyHandler(socks.SOCKS5, "127.0.0.1", 1080))
opener.open("http://www.naver.com/").read()[:100]
@ziozzang
ziozzang / elastic-apm.md
Last active February 21, 2019 00:30
Elastic APM
  • Python3 에서 동작 가능
pip install elastic-apm

  • 환경 변수 설정
# CentOS7
 yum install -y \
   git gcc wget make autoconf libtool automake perl o\
   penssl-* zlib-* libssh2-devel libssh2

mkdir -p ~/src
cd ~/src
curl https://curl.haxx.se/download/curl-7.29.0.tar.gz | tar xzv
@ziozzang
ziozzang / Dockerfile
Created May 16, 2019 23:29
RHEL8 Mirrors
# For RHEL8
FROM registry.access.redhat.com/ubi8
# For RHEL7
FROM registry.access.redhat.com/rhel
RUN subscription-manager register --username="id_here" --password="pass_here" --auto-attach && \
subscription-manager refresh && \
yum install -y yum-utils createrepo
@ziozzang
ziozzang / install-agent.sh
Last active May 17, 2019 06:36
K3s-as-docker
#!/bin/bash
MASTER_IP="10.1.2.96"
HOSTNAME=`hostname`
CA_FILE="/opt/k3s-master/output/ca-certificates.crt"
TOKEN=`cat /opt/k3s-master/data/server/node-token`
WORK_DIRS="/opt/${HOSTNAME}"
mkdir -p ${WORK_DIRS} || true
cp -f ${CA_FILE} ${WORK_DIRS}/
#!/bin/bash
# ./tar-diff.sh dir_name_here 8
DIR_NAMES=${1:-"asdf"}
DAYS=${2:-"8"}
LASTDATE=`(date --date "${DAYS} days ago" --rfc-3339=seconds)`
TIMESTMP=`date '+%Y-%m-%d'`
tar -cvz --newer-mtime="${LASTDATE}" -f ${DIR_NAMES}-diff-${TIMESTMP}-${DAYS}d.tgz ${DIR_NAMES}
@ziozzang
ziozzang / cloudflare-update-record.sh
Created August 12, 2019 07:19 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
@ziozzang
ziozzang / ldap
Last active October 16, 2019 02:32
LDAP initialize
DATA_PATH=`pwd`
docker run \
-d --name=ldap \
-p 389:389 -p 636:636 \
-e LDAP_DOMAIN="foo.com" \
-e LDAP_ADMIN_PASSWORD="admin0" \
-e LDAP_ORGANISATION="myorg" \
-e LDAP_READONLY_USER="true" \
-e LDAP_READONLY_USER_USERNAME="search" \
# kubectl create -f https://gist.githubusercontent.com/ziozzang/6fbed3913f12fae26ed85104286be919/raw/80a31373b4cf81a6103e8621119a0b90105e6211/k8s-test-pod.yml
apiVersion: v1
kind: ReplicationController
metadata:
name: test
spec:
replicas: 1
selector:
name: test