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
@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 / test.ts
Created August 3, 2023 17:14
Vite Vue i18n mock
vi.mock('vue-i18n', () => ({
useI18n: () => ({
t: (tKey: string) => tKey,
}),
}));
@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 / 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 / .npmrc
Created September 2, 2022 14:23
Install storybook for pnpm+vue3 project
auto-install-peers=true
@brachkow
brachkow / .npmrc
Created September 2, 2022 14:22
Install storybook for pnpm+vue3 project
auto-install-peers=true

Header1

Header2

Header3

Header4

Header5
Header6

H1

H2