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
| import cProfile | |
| import pstats | |
| import io | |
| import statistics | |
| import pandas as pd | |
| # Define the deduplication functions | |
| def deduplicate_set(arr): | |
| return list(set(arr)) |
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
| 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/ |
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
| 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" |
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
| xcrun simctl addmedia booted ./MyFile.jpg |
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
| for i in *.png; do sips -s format jpeg $i --out $i.jpg ;done |
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
| find . -type f -exec sed -i.orig 's/ / /g' {} + |
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
| find . -type f -name '*.js' -exec sed -i '' s/.jsx//g {} + |
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
| "NeoBundle Scripts----------------------------- | |
| if has('vim_starting') | |
| if &compatible | |
| set nocompatible " Be iMproved | |
| endif | |
| " Required: | |
| set runtimepath+=/Users/marekpawlowski/.vim/bundle/neobundle.vim/ | |
| endif |
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 loadContent(href, pushState) { | |
| var el = $('<div></div>'); | |
| el.load(href + ' .placeholder', function (response, status, xhr) { | |
| if (status === 'error') { | |
| w.location = href; | |
| } else { | |
| if (pushState) { | |
| window.history.pushState({}, document.title, href); | |
| } |
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
| var getDeferred = function (i) { | |
| var deferred = new $.Deferred(); | |
| setTimeout(function () { | |
| if (--i) { | |
| deferred.resolve(i); | |
| } else { | |
| deferred.reject(i); | |
| } | |
| }, 2000); |
NewerOlder