This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
// 우클릭 차단을 해제하는 함수 | |
function enableRightClick(e) { | |
e.stopPropagation(); | |
} | |
// 컨텍스트 메뉴 이벤트 재정의 | |
document.addEventListener('contextmenu', enableRightClick, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -h -d 1 2>/dev/null | sort -rh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Append in ~/.direnvrc below: | |
use_node() { | |
layout node | |
local node_version=$1 | |
if [ "$node_version" == "package.json" ]; then | |
# Requires jq: `brew install jq` | |
if ! command -v jq &> /dev/null; then | |
echo -e "\033[0;31mjq is not installed. Please type 'brew install jq'.\033[0m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use ko_KR.utf8 for lower version of Postgres | |
# ex: select * from sample_table order by "name" COLLATE "ko-KR-x-icu"; | |
ko_name = Func("name", function="ko-KR-x-icu", template='(%(expressions)s) COLLATE "%(function)s"') | |
queryset = queryset.order_by(ko_name.asc()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install duti python-yq | |
curl "https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml" \ | |
| yq -r "to_entries | (map(.value.extensions) | flatten) - [null] | unique | .[]" \ | |
| xargs -L 1 -I "{}" duti -s com.microsoft.VSCode {} all | |
# Use duti to set defaults for specific files to VSCode | |
duti -s com.microsoft.VSCode public.plain-text all | |
duti -s com.microsoft.VSCode public.source-code all | |
duti -s com.microsoft.VSCode public.data all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@layer utilities { | |
/* extra helper classes for iphone safe areas */ | |
.safe-p { | |
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); | |
} | |
.safe-px { | |
padding-left: env(safe-area-inset-left); | |
padding-right: env(safe-area-inset-right); | |
} | |
.safe-py { |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
NewerOlder