Skip to content

Instantly share code, notes, and snippets.

Happy Today!

Minho Ryang minhoryang

Happy Today!
View GitHub Profile
wickedev /
Last active Oct 24, 2021
fzf + tail + nl
tail -n +0 $1 \
| nl -ba \
| fzf --multi \
--ansi \
--no-sort \
--reverse \
--tac \
--preview 'sed -n "$(({n}-4)),$(({n}+6))p" '$1' | nl -v $(({n}-4)) -ba' \
leoh0 /
Last active Dec 28, 2021
containerd를 이용해서 standalone kubelet 사용하기

가끔 kubernetes 같은건 너무 무거워서 단일 호스트에 docker만 띄워서 운영하는 경우같은걸 고민 하게 됩니다. 하지만 그냥 docker만 가지고 사용하면 컨테이너가 죽었을때 관리해 줘야 하는 불편함과 같이 기능을 보다 더 필요로 하게 됩니다. 그래서 이 방법을 소개해 드립니다.

이건 standalone kubelet 이라고 불리는 master 없이 node만 관리해주는 kubelet을 이용해서 container를 관리하는 방법입니다. 이건 k8s 초기 부터 원래 존재했던 컨셉이나 많이 알려져 있지 않아서 모르시는 분들이 많아서 이글을 작성해 봤습니다.

이 방법을 이용하면 실제 master 없이 kubelet 만으로 서비스를 할 수 있습니다. 컨테이너 자동 재시작, port forwarding, resource limit 등 기본적인 kubelet에서 제공하는 다양한 방법으로 컨테이너들을 관리 할 수 있습니다.

ClickerMonkey / types.ts
Last active May 25, 2022
Typescript Helper Types
View types.ts
// when T is any|unknown, Y is returned, otherwise N
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N;
// when T is never, Y is returned, otherwise N
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
// when T is a tuple, Y is returned, otherwise N
// valid tuples = [string], [string, boolean],
// invalid tuples = [], string[], (string | number)[]
Treeki / TurnipPrices.cpp
Last active Aug 15, 2022
AC:NH turnip price calculator
View TurnipPrices.cpp
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from
namespace sead
class Random
View poc.scala
scalaVersion := "2.12.8"
scalacOptions ++= Seq(
libraryDependencies += "org.typelevel" %% "cats-core" % "1.0.0"
libraryDependencies += "org.typelevel" %% "cats-effect" % "1.3.1"
libraryDependencies += "org.typelevel" %% "cats-effect-laws" % "1.3.1" % "test"
View *


There's no way to <link rel=preload> a Web Worker. This fixes that.

npm i -S gist:developit/567dde2346d785b2628224fddbf6783c

<!-- workers are now just a normal script preload: -->
<link rel=preload href=/path/to/worker.js as=script crossorigin>
alexellis /
Last active Jul 2, 2020
Customise OpenFaaS helm chart for Raspberry Pi / ARM


You can use the OpenFaaS helm chart to generate custom YAML files for your OpenFaaS installation on ARMHF and ARM64.

Why? tiller is not available for ARM so we cannot customize the chart that way. So instead we ship some defaults for the community which you can then tweak as you see fit.

But what might you want to change?

  • httpProbe - this is a much faster way to check functions are healthy than the default execProbe
andrewp-as-is / Time Machine exclusions.command
Last active Jul 11, 2022
macOS Time Machine exclusions
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
htr3n /
Last active Aug 17, 2022
Creating RAM disk in macOS


diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes: >

huewu / gist:ed8bf1485864e3ca1768740c740e19f6
Created Apr 17, 2019
Get a Widevine DEVICE UNIQUE ID by using MediaDrm API in Android (28+)
View gist:ed8bf1485864e3ca1768740c740e19f6
val WIDEVINE_UUID = UUID(-0x121074568629b532L, -0x5c37d8232ae2de13L)
val wvDrm = try {
} catch (e: UnsupportedSchemeException) {
//WIDEVINE is not available
wvDrm!!.apply {