Skip to content

Instantly share code, notes, and snippets.

View m4r00p's full-sized avatar

Marek Pawłowski m4r00p

View GitHub Profile
xcrun simctl addmedia booted ./MyFile.jpg
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u@\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"
for file in images/*; do cwebp "$file" -o "${file%.*}.webp"; done
# <picture>
# <source type="image/webp" srcset="flower.webp">
# <source type="image/jpeg" srcset="flower.jpg">
# <img src="flower.jpg" alt="">
# </picture>
# https://web.dev/serve-images-webp/
@m4r00p
m4r00p / dedup_opt.py
Created July 24, 2024 11:39
Dedup statistical analysis (Micro optimizations)
import cProfile
import pstats
import io
import statistics
import pandas as pd
# Define the deduplication functions
def deduplicate_set(arr):
return list(set(arr))