Skip to content

Instantly share code, notes, and snippets.

View tpiros's full-sized avatar
🤽‍♂️

Tamas Piros tpiros

🤽‍♂️
View GitHub Profile
@tpiros
tpiros / robbyrussell.zsh-theme
Created November 1, 2019 10:39
Adding emojis to ZSH theme
# On a Mac: /Users/<username>/.oh-my-zsh/custom/themes
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
local emojis=("👋" "🤡" "🦄" "🤙" "🐼" "😊" "🔥" "⚡" "😎" "🌎")
local selectedEmoji=${emojis[$[1+($RANDOM%${#emojis[@]})]]}
local today=$(date +%m.%d)
# local ipCountry=`curl -s ip-api.com/json | python -c "import sys, json; print json.load(sys.stdin)['country']"`
# local country=$emoji_flags[${ipCountry}]
# }
case $today in
"01.01")
@tpiros
tpiros / lcp.js
Last active August 26, 2022 14:06
LCP suparts
// https://web.dev/optimize-lcp/
const LCP_SUB_PARTS = [
'Time to first byte',
'Resource load delay',
'Resource load time',
'Element render delay',
];
new PerformanceObserver((list) => {