Skip to content

Instantly share code, notes, and snippets.

View zax4r0's full-sized avatar
πŸ˜‚
well nothing

zax4r0 zax4r0

πŸ˜‚
well nothing
View GitHub Profile
@zax4r0
zax4r0 / App.tsx
Last active October 15, 2025 18:10
cell.ts
// FastGrid.tsx (main component)
import clsx from "clsx";
import Stats from "stats.js";
import { Analytics } from "@vercel/analytics/react";
import { FilterCell, Grid, type CellRenderer } from "grid";
import { COLUMNS, generateRows } from "./generateRows";
import React, { useState, useRef, useEffect } from "react";
// Human-friendly custom React cell renderer: Highlights numeric values > 50 in green for the "amount" column (index 4)
// For other columns, just displays the value cleanly. Easy to extend with colIndex logic.
@zax4r0
zax4r0 / esume.md
Created July 15, 2024 06:06
todo-resume

Hello, folks! It's zax πŸ˜ƒ

About me

  • Self taught developer
  • Currently Learning Flutter | Python | C
  • Looking for help with Android application development (Flutter, Kotlin, React Native)
  • Ask me about anything, I'm happy to help.
@zax4r0
zax4r0 / zax4r0.md
Created July 15, 2024 05:57
Resume zax4r0
@zax4r0
zax4r0 / changelog.md
Last active May 26, 2025 06:30
Smart Git Changelog Alias

πŸ”§ Advanced Git Changelog Alias

Generate clean, conventional changelogs from your current branch vs master, with optional --author and --name flags.


πŸ“‹ Add the alias

git config --global alias.changelog '!f() { author=""; show_name="false"; while [ $# -gt 0 ]; do case "$1" in --author) author="--author=$2"; shift 2 ;; --name) show_name="true"; shift ;; *) break ;; esac; done; if [ "$show_name" = "true" ]; then git log master..HEAD --pretty=format:"- %s (@%an) (%h)" --no-merges --first-parent $author --grep="^feat\\|^fix\\|^docs\\|^style\\|^refactor\\|^perf\\|^test\\|^chore"; else git log master..HEAD --pretty=format:"- %s (%h)" --no-merges --first-parent $author --grep="^feat\\|^fix\\|^docs\\|^style\\|^refactor\\|^perf\\|^test\\|^chore"; fi; }; f'
@zax4r0
zax4r0 / alt_tab.sh
Last active July 9, 2025 05:55
scripts
#!/bin/sh
###############
# Cycle windows
# (C) 2024 zax4r0 <[email protected]>
# GNU General Public License v3.0
###############
timer_file=$(dirname $(realpath "$0"))"/alt_tab_timer.txt"
@zax4r0
zax4r0 / axios.ts
Created June 15, 2024 08:40
axiosclinet
/** @format */
import { useCookies } from "next-client-cookies";
import axios, { AxiosError, AxiosInstance, AxiosResponse } from "axios";
import { getCookies } from "next-client-cookies/server";
const TOKEN_KEY = "token";
const isServer = typeof window === "undefined";

Finding/Fixing Unintended Body Overflow


In some cases, there might be an element that is literally wider than the document is, which might cause horizontal overflow scrolling. You could use a little JavaScript to help you find the culprit.

open DevTools in browser and run this on console u will get the element causing overflow

var docWidth = document.documentElement.offsetWidth;

[].forEach.call(
@zax4r0
zax4r0 / youtube-dl.md
Created October 30, 2021 17:19 — forked from harishkannarao/youtube-dl.md
youtube-dl

youtube-dl

youtube-dl is an opensource command line tool to download video or audio from online video streaming services.

Videos downloaded in mkv or webm extensions can be played by VLC Media player in all major devices and operating systems including iPhone, Android devices.

Tool website: https://youtube-dl.org/

This gist shows the example commands to use the tool and doesn't support or encourage piracy or violation of copyrights of the online streaming service or the author of the content

Installing youtube-dl:

@zax4r0
zax4r0 / zram Arch.md
Last active October 12, 2025 03:49
Zram On Arch

zRam is a virtual memory compression using block devices named /dev/zram using a fast compression algorithm (LZ4) that compress the least recently used (LRU) or inactive space in the memory allows the GNU/Linux kernel to free up more memory with less performance hit.

zRam is greatly increased the available amount of memory by compressing memory without swap disks/partition. It is recommended for the user to use zRam instead of not use/disable the swap to prevent out of memory (OOM) killer. Create a zRam block devices Load the zRam modules to the kernel using modprobe:

sudo modprobe zram

Set the zRam extremely fast compression algorithm using lz4: