Skip to content

Instantly share code, notes, and snippets.

View bendera's full-sized avatar

Adam Bender bendera

  • Budapest, Hungary
  • 05:41 (UTC +02: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 October 13, 2025 15:30
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
@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 September 13, 2025 12:13
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)];
}
@jacklorusso
jacklorusso / workbench.colorCustomizations.json
Last active March 21, 2025 18:08
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",