Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# 1. 환경 설정
WG_CONF="/etc/wireguard/wg0.conf"
SERVER_PUB_KEY=$(wg show wg0 public-key 2>/dev/null)
ENDPOINT="hostname:51820"
DNS="8.8.8.8"
ALLOWED_IPS_CLIENT="10.50.0.0/24, 10.10.10.0/24"
# 2. 실시간 상태 분석
@seoulworker
seoulworker / script.sh
Last active October 14, 2025 02:49
Cloudflare DNS Record Auto Update Script
IP=$(nslookup myip.opendns.com resolver1.opendns.com | awk '/^Address: /{ ip=$2 } END{ print ip }')
curl -s -X PUT \
"https://api.cloudflare.com/client/v4/zones/[Zone ID]/dns_records/[DNS Record ID]" \
-H "Authorization: Bearer [API Token]" \
-H "Content-Type: application/json" \
--data '{
"type": "A",
"name": "[Target Domain]",
"content": "'"$IP"'",
@seoulworker
seoulworker / .zshrc
Created July 30, 2024 00:41
My .zshrc
export LC_ALL=ko_KR.UTF-8
clear() {
if [[ "$1" == "--hard" ]]; then
# 히스토리 파일 비우기
:> ~/.zsh_history
# 현재 세션 히스토리 지우기
history -p
# 화면 지우기
command clear
@seoulworker
seoulworker / install-iaccess.sh
Created July 25, 2024 23:35
Install an IBM i Series (AS/400) ODBC Driver on Debian based distributions
#!/bin/sh
# 1. Add IBM Repo
curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | sudo tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list
# 2. Update repo list
sudo apt update -y
# 3. Install ODBC Drivers
sudo apt install -y ibm-iaccess
powercfg /batteryreport
start battery-report.html
timeout /t 5
del /f /q battery-report.html
@seoulworker
seoulworker / gist:e13715ceca923053afc74612e5d0b4ed
Last active June 4, 2020 08:36
Make Linux 'ls' command stylish
ls -hal --group-directories-first --time-style=+'%Y/%m/%d %H:%M:%S'
@seoulworker
seoulworker / dotnet-build-linux-x64.cmd
Last active June 4, 2020 08:36
.NET Core application auto publishing batch (Linux/amd64)
rd /s /q linux-x64
for %%i in (1,1,3) do cd ..
dotnet publish -r linux-x64 --self-contained true
@seoulworker
seoulworker / user.js
Last active July 12, 2022 07:19
[Tampermonkey] 하이웍스 메일발송 UI/UX 개선
// ==UserScript==
// @name 하이웍스 메일발송 UI/UX 개선
// @version 1.4
// @author MinkiDev
// @match https://*.office.hiworks.com/*/mail*
// ==/UserScript==
(function() {
if(window.location.href.includes("m_write")) {
document.getElementsByClassName("main-btn")[0].style = "background-color: #cccccc; color: #808080; pointer-events: none;";
@seoulworker
seoulworker / disable-bash-history.sh
Last active July 24, 2024 07:44
Disable bash history
#!/bin/bash
echo 'unset HISTFILE' >> ~/.bash_profile
set +o history
rm -f .bash_history
echo 'done'
@seoulworker
seoulworker / disable_windows_touch_key.reg
Created June 24, 2019 04:50
Registry to disable windows(super) touch key
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,00,00,00,00