Skip to content

Instantly share code, notes, and snippets.

Happy Today!

Minho Ryang minhoryang

Happy Today!
View GitHub Profile
minhoryang /
Last active Sep 17, 2021
import yaml
import click
from conda.core.index import get_index
from import Channel
from conda.resolve import Resolve
from conda_mirror.conda_mirror import DEFAULT_PLATFORMS
minhoryang / injector.js
Created Dec 22, 2018
Inject custom script to main page's document.head, used for bypassing Chrome Extension's Content-Scripts Sandbox.
View injector.js
'Drink Responsibly, Blackmagic lives here.';
* Inject custom script to main page's document.head.
* Used for bypassing Chrome Extension's Content-Scripts Sandbox.
* @param {{type?: string, src?: string, text?: string}} content
* @see Microsoft/vscode#22980, "JSDoc comments are ignored for destructured parameters".
* @see Microsoft/typescript#11597, "Intellisense for object properties defined in multi-line JSDOC comments".
minhoryang /
Created Dec 20, 2018
Email Driven Git Workflow

Email Driven Git Workflow

1. Send your works to peers:

(@ wanted branch)

$ git format-patch -o patched/ -1

  • how many commit? 1

$ git log --format=oneline --decorate=short -10 patches/git.log

minhoryang /
Last active Sep 17, 2021
Semver based API Gateway?
  • api.corp.domain.local/$service/$semver/... -> 307 Temporary Redirect to SEMVER Matched Server.

  • api.corp.domain.local/frontend/^2.0.0/... $service: frontend, $semver: ^2.0.0

  • api.corp.domain.local/frontend/~2.0.0/... $service: frontend, $semver: ~2.0.0

  • api.corp.domain.local/frontend/2.0.0/...

  • api.corp.domain.local/frontend/2.0/...

  • api.corp.domain.local/frontend/2/...

  • $service.api.corp.domain.local/$semver/...

  • frontend.api.corp.domain.local/2.0.0/...

  • frontend.api.corp.domain.local/latest/...

minhoryang / gist:b7f591de4ff94981dc086649a6321cc7
Created Jan 21, 2017
"fatal error: 'openssl/hmac.h' file not found", If you are on macOS, please install openssl and check your OpenSSL configuration:
View gist:b7f591de4ff94981dc086649a6321cc7
brew install openssl
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
export DEP_OPENSSL_INCLUDE=`brew --prefix openssl`/include
minhoryang /
Created Dec 3, 2015
Get the battery status of Apple Bluetooth Devices
# for Release Friends
ioreg -c BNBMouseDevice | grep BatteryPercent
ioreg -c BNBTrackpadDevice | grep BatteryPercent
ioreg -c AppleBluetoothHIDKeyboard | grep BatteryPercent
minhoryang /
Last active Sep 15, 2021
"$ selinon inspect" with demo-worker
#!/usr/bin/env python3
# auto-generated using Selinon v1.1.0 on YUNITTO.local at 2019-08-01 08:32:04.649657
from demo_worker.foreach import iter_travis_builds as _foreach__travis_repo_builds_1
from demo_worker.foreach import iter_travis_builds_count as _foreach_travis_repo_logs_1
from demo_worker.foreach import iter_travis_repos as _foreach_travis_org_logs_1
from demo_worker.tasks import HelloTask as HelloTask
from demo_worker.tasks import TravisActiveRepos as TravisActiveRepos
from demo_worker.tasks import TravisRepoBuilds as TravisRepoBuilds
from demo_worker.tasks import TravisLogTxt as TravisLogTxt
minhoryang /
Created Aug 20, 2019
FLASK with UDS(Unix Domain Socket)
minhoryang /
Last active Sep 15, 2021
Fetching Github PR # Only (for CI)
git init
git remote add origin <REMOTE_URL>
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
git fetch --no-tags --depth=1 --recurse-submodules=yes --multiple -j origin pull/<PR_NO>/head:refs/remotes/origin/pr/<PR_NO>
git checkout origin/pr/<PR_NO>
git log # one commit!
git describe —all # remotes/origin/pr/259
View Time Machine exclusions.command
#!/usr/bin/env bash
{ set +x; } 2>/dev/null
set "$@" $(find ~ -name ".*" ! -name ".CFUserTextEncoding" ! -type l -mindepth 1 -maxdepth 1) # dotfiles
set "$@" $(find ~ -name "Google *" -mindepth 1 -maxdepth 1) # Google Drive
set "$@" ~/git # store on github/etc :)
set "$@" ~/node_modules
set "$@" ~/Applications # install apps with brew cask