Skip to content

Instantly share code, notes, and snippets.

View brachkow's full-sized avatar
🏠
Working from home

Timur Brachkow brachkow

🏠
Working from home
View GitHub Profile

Header1

Header2

Header3

Header4

Header5
Header6

H1

H2

@brachkow
brachkow / .npmrc
Created September 2, 2022 14:22
Install storybook for pnpm+vue3 project
auto-install-peers=true
@brachkow
brachkow / .npmrc
Created September 2, 2022 14:23
Install storybook for pnpm+vue3 project
auto-install-peers=true
@brachkow
brachkow / favicon.sh
Last active November 5, 2023 21:18
Make a favicon for everything from single SVG
# generate icon.svg
cp input.svg icon.svg
# generate icon-512.png
inkscape ./icon.svg --export-width=512 --export-filename="./icon-512.png"
# generate icon-192.png
inkscape ./icon.svg --export-width=192 --export-filename="./icon-192.png"
# genrate favicon.ico
@brachkow
brachkow / depaginate.ts
Created May 14, 2023 09:48
Django depaginator
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
function paramsToObject(searchParams: URLSearchParams): { [key: string]: string } {
const params: { [key: string]: string } = {};
searchParams.forEach((value: string, key: string) => {
params[key] = value;
});
return params;
@brachkow
brachkow / test.ts
Created August 3, 2023 17:14
Vite Vue i18n mock
vi.mock('vue-i18n', () => ({
useI18n: () => ({
t: (tKey: string) => tKey,
}),
}));
@brachkow
brachkow / alfred.sh
Last active September 3, 2023 19:20
Alfred file Universal Action example
export PATH=/opt/homebrew/bin
query=$1
for FILE in "$@"; do
convert "$FILE" "${FILE%%.*}.jpg"
done
@brachkow
brachkow / ytfix.js
Last active May 11, 2024 14:05
YouTube Adblock Bypass Bookmarklet
!function(){var a=window.location.href.match(/watch\?v=([a-zA-Z0-9_-]+)/);if(a){var o="https://www.youtube.com/embed/"+a[1];window.location.href=o}else alert("Not a valid YouTube watch URL.")}();
@brachkow
brachkow / paywall.js
Last active November 8, 2024 13:36
Bookmarklets
javascript:(function() {
window.open('https://archive.is/?run=1&url=' + encodeURIComponent(window.location.href));
})();