Skip to content

Instantly share code, notes, and snippets.

View tarasyarema's full-sized avatar
🐱
:3

2pac tarasyarema

🐱
:3
View GitHub Profile
@tarasyarema
tarasyarema / use-query-params.ts
Created September 24, 2025 12:42
React - useTypedQueryParams
import { useCallback, useMemo } from "react";
import { useSearchParams } from "react-router";
export type QueryParamsMap = Record<string, string | undefined>;
export interface UseQueryParamsReturn {
/**
* All query parameters as a key-value map
*/
params: QueryParamsMap;

Keybase proof

I hereby claim:

  • I am tarasyarema on github.
  • I am tarasyarema (https://keybase.io/tarasyarema) on keybase.
  • I have a public key ASB6McGHkDmYly2lJ0mU5RQiGEpuwy8RzXgGzSNpvUhHqgo

To claim this, I am signing this object:

1,2,3
@tarasyarema
tarasyarema / compress_image.py
Last active September 13, 2019 10:59 — forked from ShantanuJoshi/compressMe.py
Python Image Compress
# Reference
# https://shantanujoshi.github.io/python-image-compression/
import os
import sys
from PIL import Image
def compressMe(file, verbose=False):
filepath = os.path.join(os.getcwd(), file)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tarasyarema
tarasyarema / c++Template.cpp
Created October 8, 2018 20:56 — forked from kodekracker/c++Template.cpp
Basic C++ Template for Competitive Programming
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/