Skip to content

Instantly share code, notes, and snippets.

View gwangyi's full-sized avatar

Sungkwang Lee gwangyi

View GitHub Profile
#include <iostream>
template<class T>
class Derived;
template<class T>
class Base {
friend class Derived<T>;
private:
int private_ = 0;
@gwangyi
gwangyi / docker-compose.yaml
Created February 7, 2022 12:32
OpenVPN to SOCKS5 proxy
version: "3.9" # optional since v1.27.0
services:
vpn:
image: dperson/openvpn-client
ports:
- "1080:1080"
volumes:
- .:/vpn
cap_add:
- NET_ADMIN
#!/bin/bash
# How to run?
# $ curl -sL https://gist.githubusercontent.com/gwangyi/330d22c4d16023ae0697ad0840dd65aa/raw/use-socks5-proxy.sh | bash -s - ~/.kodi/addons/your.plugin.directory
SOCKS5HOST=${2:-127.0.0.1}
SOCKS5PORT=${3:-1080}
PYSOCKS_VERSION="1.7.0"
--- a/base/base/base.zsh
+++ b/base/base/base.zsh
@@ -107,7 +107,7 @@ __zplug::base::base::git_version()
fi
__zplug::base::base::version_requirement \
- ${(M)${(z)"$(git --version|head -1)"}:#[0-9]*[0-9]} ">" "${@:?}"
+ $(git --version | grep -Eo '([0-9]+\.)*[0-9]+' | head -1 | tr -d '\n') ">" "${@:?}"
return $status
}
@gwangyi
gwangyi / coin.py
Created December 1, 2017 06:51
코인원 시세 보여주는 짧은코드. 5초마다 업뎃
import sys
import os
import json
import time
import locale
if sys.version_info > (3, ):
from urllib.request import urlopen
else:
from urllib2 import urlopen