Skip to content

Instantly share code, notes, and snippets.

View bendera's full-sized avatar

Adam Bender bendera

  • Budapest, Hungary
  • 08:04 (UTC +01:00)
View GitHub Profile
@maciejpedzich
maciejpedzich / TableOfContents.astro
Last active August 25, 2025 06:07
Astro Table Of Contents Component + Sample Usage
---
import type { MarkdownHeading } from 'astro';
type Props = {
headings: MarkdownHeading[];
};
type HeadingWithSubheadings = MarkdownHeading & {
subheadings: MarkdownHeading[];
};
@sts10
sts10 / rust-command-line-utilities.markdown
Last active December 20, 2025 21:52
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@jonlabelle
jonlabelle / npm_version_cheatsheet.md
Last active December 24, 2025 22:48
npm version cheatsheet

npm uses Semantic Versioning

npm uses Semantic Versioning. Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, e.g. 1.0.0-alpha.

@ZacharyPatten
ZacharyPatten / ConsoleInput.md
Last active September 24, 2025 20:49
Beginner's Guide To Console Input In C#

Beginner's Guide To Console Input In C#

Note: I recommend reading this gist in order because Examples 1-6 build on each other.

@victorcrbt
victorcrbt / Client.ts
Last active August 8, 2025 06:36
TypeORM ManyToMany relation with custom pivot table and column names.
import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, JoinTable } from 'typeorm';
import Company from './Company';
@Entity('clients')
export default class Client {
@PrimaryGeneratedColumn()
id: number;
@Column()
@tomhicks
tomhicks / plink-plonk.js
Last active December 4, 2025 03:23
Listen to your web pages
@tswistak
tswistak / Hello.tsx
Created May 7, 2019 20:19
InversifyJS with React Hooks, listing 1
import React from 'react';
import { useInjection } from './ioc.react';
import { IProvider } from './providers';
export const Hello: React.FC = () => {
const provider: IProvider<string>; // here we need to inject our provider
return (
<h1>Hello {provider.provide()}!</h1>
);
@jsoverson
jsoverson / electron-puppeteer.js
Created March 28, 2019 18:32
Example of automating VS Code with puppeteer
const childProcess = require('child_process');
const puppeteer = require('puppeteer');
const request = require('request-promise-native');
var delay = require('timeout-as-promise');
function spawn(port) {
return childProcess.spawn(
// '/Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/MacOS/Electron',
'/Applications/Visual Studio Code.app/Contents/MacOS/Electron',
[
@1natsu172
1natsu172 / .eslintrc
Last active March 26, 2025 13:00
My airbnb based ESLint config for "typescript-eslint" with React & prettier
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"jest/globals": true
},
@mauricedb
mauricedb / Subject under test
Last active December 7, 2023 14:46
Testing stateful React hooks
import { useState } from 'react';
export function useCounter(initial = 0) {
const [count, setCount] = useState(initial);
return [count, () => setCount(count + 1)];
}