Skip to content

Instantly share code, notes, and snippets.

View kyujin-cho's full-sized avatar

Kyujin Cho kyujin-cho

  • Gangnam-gu, Seoul, S. Korea
  • 12:30 (UTC +09:00)
View GitHub Profile
@kyujin-cho
kyujin-cho / gist:63e58ffd82807d1a152b2852acb1ebbc
Created April 30, 2023 16:40
VyOS를 이용한 VPN Router 만들기

목적

192.168.0.0/24 에서 출발하여 특정 도메인/지역으로 향하는 트래픽을 192.168.0.1/32 대신 Wireguard VPN으로 터널

구성

Network (AS-IS)

Local

  • Main NAT: 192.168.0.0/24 (UniFi)

Remote

  • Mullvad Wireguard
diff --git a/PKGBUILD b/PKGBUILD
index 413c1e5..1819232 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,25 @@
pkgname=1password
_tarver=8.9.10
-_tar="1password-${_tarver}.x64.tar.gz"
+_tar="1password-latest.tar.gz"
diff --git a/PKGBUILD b/PKGBUILD
index ba8af70..140239a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,9 @@
pkgname=("wezterm-git")
pkgdesc="A terminal emulator implemented in Rust, using OpenGL ES 2 for rendering."
-pkgver=20210916.085405.e36cf754
+pkgver=20230102.155114.67896f67
@kyujin-cho
kyujin-cho / brave-beta.patch
Last active January 6, 2023 11:22
Brave Beta Bin - Arm64
diff --git a/.SRCINFO b/.SRCINFO
index 24c390d..334813e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
pkgbase = brave-beta-bin
pkgdesc = Web browser that blocks ads and trackers by default (beta binary release).
- pkgver = 1.48.115
+ pkgver = 1.48.113
pkgrel = 1
@kyujin-cho
kyujin-cho / kernel-5.10.patch
Last active March 30, 2023 03:34
MLNX_OFED 4.9-4.1.7.0 on Debian 11
diff -Naur /home/kyujin/mlnx-ofed-patch/mlnx-ofed-kernel-4.9-orig/include/linux/sched/mm.h include/linux/sched/mm.h
--- a/include/linux/sched/mm.h 2021-12-08 23:08:07.000000000 +0900
+++ b/include/linux/sched/mm.h 2022-08-05 17:28:35.539301521 +0900
@@ -35,18 +35,18 @@
#if !defined (HAVE_MMGET_STILL_VALID) && !defined(HAVE_MMGET_STILL_VALID_IN_SCHED_H) && !defined(HAVE_MMGET_STILL_VALID_IN_MM_H)
/*
* This has to be called after a get_task_mm()/mmget_not_zero()
- * followed by taking the mmap_sem for writing before modifying the
+ * followed by taking the mmap_lock for writing before modifying the
* vmas or anything the coredump pretends not to change from under it.
@kyujin-cho
kyujin-cho / 0-README.md
Last active December 28, 2020 03:52
Patch for Python 3.8.7 source to be built from ARM64 Darwin (a.k.a. Apple Silicon Macs)

Build Instructions

  1. Download Python 3.8.7 source from https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tar.xz and unpack it
  2. cd into unpacked Pyhton-3.8.7 directory
  3. Apply patch with patch -p0 < <path to patch file>
  4. Configure and make like normal condition

For pyenv

  • Set prefix to $HOME/.pyenv/versions/3.8.7 when running configure script, and run make && make install
@kyujin-cho
kyujin-cho / README.md
Last active August 9, 2020 12:11
i386 Snow Leopard에 새생명 불어넣기

Web Browsing

Web Browser

Firefox ESR 45 사용 시 TLSv1.2 및 HTML5를 대응한다.

Command-Line

문제점

내장 OpenSSL이 TLSv1.0/1.1/1.2/1.3을 지원 안한다!

해결책

@kyujin-cho
kyujin-cho / update.py
Last active May 9, 2020 04:38
CloudFlare DDNS script with Python
import requests
import CloudFlare
import os
from dotenv import load_dotenv
load_dotenv(verbose=True)
zone_name = os.environ['CF_ZONE_NAME']
dns_name = os.environ['CF_RECORD_NAME']
my_ip = res = requests.get('https://ipconfig.io', headers={'User-Agent': 'curl'}).text.strip()
@kyujin-cho
kyujin-cho / utils.patch
Created April 7, 2020 06:18
Fast Style Transfer Patch
diff --git src/utils.py src/utils.py
index 36080f2..30832c5 100644
--- src/utils.py
+++ src/utils.py
@@ -1,23 +1,25 @@
-import scipy.misc, numpy as np, os, sys
+import numpy as np, os, sys
+import imageio
+import skimage.transform