Skip to content

Instantly share code, notes, and snippets.

View minhoryang's full-sized avatar
😍
Happy Today!

Minho Ryang minhoryang

😍
Happy Today!
View GitHub Profile
@andrewpetrochenkov
andrewpetrochenkov / Time Machine exclusions.command
Last active August 23, 2024 02:15
macOS Time Machine exclusions
#!/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
@htr3n
htr3n / macos-ramdisk.md
Last active March 30, 2025 14:42
Creating RAM disk in macOS

Built-in

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
huewu / gist:ed8bf1485864e3ca1768740c740e19f6
Created April 17, 2019 07:24
Get a Widevine DEVICE UNIQUE ID by using MediaDrm API in Android (28+)
val WIDEVINE_UUID = UUID(-0x121074568629b532L, -0x5c37d8232ae2de13L)
val wvDrm = try {
MediaDrm(WIDEVINE_UUID)
} catch (e: UnsupportedSchemeException) {
//WIDEVINE is not available
null
}
wvDrm!!.apply {
@dahlia
dahlia / vscode.md
Last active January 14, 2022 09:10
Libplanet 개발 환경 설정

Libplanet 개발 환경 설정 (VS Code)

[Libplanet]은 널리 쓰이는 게임 엔진인 Unity를 염두에 두어, C#으로 작성되었습니다. 따라서 C# 개발 환경이 필요합니다. 다행히 .NET은 요 몇 년 사이 여러 플랫폼에서 두루 개발할 수 있는 여건이 마련되었습니다. 이 문서는 Linux, macOS, Windows 모두에서 Libplanet 개발을 하는 데에 필요한 환경을 설정하고 빌드하는 방법을 설명합니다.

따라하면서 잘 안되는 게 있으시면 [저희 Discord 서버][1]에 있는

@happyhater
happyhater / irccloud-keepalive.sh
Created December 25, 2018 19:00
keepalive IRCCloud - Trial Account
#!/bin/bash
## zmeu ([email protected]) Tue Dec 25 12:49:04 CST 2018
## keepalive IRCCloud - Trial Account
AGENT="IRCCloud/4.5 (iPhone; en; iPhone OS 12.1.2)"
URL="https://www.irccloud.com/chat"
USER="YOUR-ACCOUNT-NAME"
PASS="YOUR-PASSWORD"
TOKENIZE=$(curl -s -A $AGENT -X POST "$URL/auth-formtoken" --header "content-length: 0"|cut -d"\"" -f8)
SESSION=$(curl -s -A $AGENT -d email=$USER -d password=$PASS -d token=$TOKENIZE --header "content-type: application/x-www-form-urlencoded" --header "x-auth-formtoken: $TOKENIZE" "$URL/login"|cut -d"\"" -f8)
@janeczku
janeczku / mac-os-trust-custom-ca.md
Last active January 21, 2025 13:22
How to trust custom, self-signed certificates by adding the CA cert to the macOS keychain

Method 1: Add the CA cert to the system certificate store

$ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt

Method 2: Add the CA cert to the user's local keychain only

$ sudo security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain ca.crt
@borkmann
borkmann / micro-k8s-setup.md
Last active August 18, 2024 07:44 — forked from joestringer/micro-k8s-setup.md
MicroK8s setup for Cilium

Set up microk8s with Cilium for development

Microk8s is a Canonical project to provide a kubernetes environment for local development, similar to minikube but without requiring a separate VM to manage. These instructions describe setting it up for common development use cases with Cilium and may be helpful in particular for testing BPF kernel extensions with Cilium.

Microk8s will run its own version of docker for the kubernetes runtime, so if you have an existing docker installation then this may be confusing, for instance when building images the image may be stored with one of these installations and not the other. This guide assumes you will run both docker daemon instances, and use your existing docker-ce for building Cilium while using the microk8s.docker daemon instance for the runtime of your kubernetes pods.

Requirements

@sebmarkbage
sebmarkbage / The Rules.md
Last active April 12, 2025 17:55
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@pmalek
pmalek / shared_tmux.sh
Created February 9, 2018 15:07
Tmux read only shared session setup
#/bin/bash
SHARED_SESSION_FILE=/tmp/shared_tmux_session
set -e
tmux -2 -S ${SHARED_SESSION_FILE} new -s guest -d
sudo chown $(whoami) ${SHARED_SESSION_FILE}
sudo chmod 777 ${SHARED_SESSION_FILE}