Skip to content

Instantly share code, notes, and snippets.

View wufniks's full-sized avatar

신희제(Heejae Shin) wufniks

  • Seoul, Korea
View GitHub Profile
#!/bin/zsh
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
@matthiassb
matthiassb / dns-sync.sh
Last active August 24, 2024 09:43
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
@anthonynsimon
anthonynsimon / aiohttp_trace.py
Last active November 19, 2024 18:04
aiohttp tracing
import aiohttp
def request_tracer(results_collector):
"""
Provides request tracing to aiohttp client sessions.
:param results_collector: a dict to which the tracing results will be added.
:return: an aiohttp.TraceConfig object.
:example:
@mrkline
mrkline / parent-polymorphism.cpp
Last active May 13, 2022 08:08
Sean Parent's polymorphism demo
// See http://sean-parent.stlab.cc/presentations/2016-10-10-runtime-polymorphism/2016-10-10-runtime-polymorphism.pdf
// or an earlier version, "Inheritance Is The Base Class of Evil"
#include <iostream>
#include <memory>
#include <string>
#include <vector>
using namespace std;
@harlow
harlow / golang_job_queue.md
Last active March 29, 2025 04:55
Job queues in Golang
@staltz
staltz / introrx.md
Last active May 11, 2025 22:46
The introduction to Reactive Programming you've been missing
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten