Skip to content

Instantly share code, notes, and snippets.

View ippatev's full-sized avatar
🎯
Focusing

Aleksandr Ippatev ippatev

🎯
Focusing
View GitHub Profile
@ippatev
ippatev / index.tsx
Created June 19, 2025 06:20
ScrollArea with h-full
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { ScrollArea } from '@/components/ui/scroll-area';
import { useEffect, useState } from 'react';
interface IDataObject {
userId: number;
id: string;
title: string;
body: string;
}

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W
@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active August 4, 2025 03:02
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

// ==UserScript==
// @name Overleaf jump $
// @namespace http://tampermonkey.net/
// @version 0.1
// @match https://www.overleaf.com/project/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
@gaearon
gaearon / minesweeper.html
Last active December 24, 2024 13:16
minesweeper (incomplete/simplfied). stream: https://www.youtube.com/watch?v=CL01_m50TYY
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="canvas"></div>
<button id="restart">Restart</button>
<script src="minesweeper.js"></script>
<style>
* {
@JARVIS-AI
JARVIS-AI / GitHub-SSH.md
Created February 23, 2021 13:31
GitHub SSH Windows 10 WSL2

Add SSH to GitHub

Why another tutorial about SSH on Windows 10 for GitHub ?!

Because EVEN official documentation is messy (At least for me)

So I make a cheatsheet for myself and share it for you

@bartoszgajda55
bartoszgajda55 / countevents.component.html
Last active August 17, 2021 15:59
Using Angular and Chart.js to build real-time charts
<mat-card>
<mat-card-title>Number of RSVPs created</mat-card-title>
<mat-card-subtitle
>Counted number of events created, within every 10 second
window</mat-card-subtitle
>
<mat-card-content>
<canvas
baseChart
width="600"
@oofnikj
oofnikj / answerfile
Last active September 25, 2025 05:43
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
import React from "react";
import TodoForm from "./TodoForm";
import Todo from "./Todo";
/*
TodoMVC
1. add todo
2. display todos
3. cross off todo
4. show number of active todos
function topThreeWords(text) {
const cleanString = text.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,"").toLowerCase(),
words = cleanString.match(/\S+/g) || [],
frequencies = {};
let word, frequency, i;
for( i=0; i<words.length; i++ ) {
if (words[i].match(/^[\\']+$/)){
word = []
}