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

PreloadableWorker

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
alexellis / GUIDE.md
Last active July 2, 2020 02:25
Customise OpenFaaS helm chart for Raspberry Pi / ARM

Guide

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
andrewp-as-is / Time Machine exclusions.command
Last active February 10, 2024 08:23
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 April 8, 2024 21:43
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 (zmeu@whitehat.ro) 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 March 18, 2024 12:30
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 December 24, 2023 08:01 — 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