Skip to content

Instantly share code, notes, and snippets.

Avatar
😍
Happy Today!

Minho Ryang minhoryang

😍
Happy Today!
View GitHub Profile
@minhoryang
minhoryang / conda-tree-shaker.py
Last active Sep 17, 2021
[UNTESTED] conda-tree-shaker.py
View conda-tree-shaker.py
import yaml
import click
from conda.core.index import get_index
from conda.models.channel import Channel
from conda.resolve import Resolve
from conda_mirror.conda_mirror import DEFAULT_PLATFORMS
@minhoryang
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
minhoryang / EmailDrivenGitWorkflow.md
Created Dec 20, 2018
Email Driven Git Workflow
View EmailDrivenGitWorkflow.md

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
minhoryang / concept.md
Last active Sep 17, 2021
Semver based API Gateway?
View concept.md
  • 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
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
minhoryang / getAppleBluetoothBatteryStatus.sh
Created Dec 3, 2015
Get the battery status of Apple Bluetooth Devices
View getAppleBluetoothBatteryStatus.sh
# for Release Friends
ioreg -c BNBMouseDevice | grep BatteryPercent
ioreg -c BNBTrackpadDevice | grep BatteryPercent
ioreg -c AppleBluetoothHIDKeyboard | grep BatteryPercent
@minhoryang
minhoryang / outputfile.py
Last active Sep 15, 2021
"$ selinon inspect" with demo-worker
View outputfile.py
#!/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
minhoryang / README.md
Created Aug 20, 2019
FLASK with UDS(Unix Domain Socket)
@minhoryang
minhoryang / git-pr.sh
Last active Sep 15, 2021
Fetching Github PR # Only (for CI)
View git-pr.sh
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
IFS=$'\n'
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