Skip to content

Instantly share code, notes, and snippets.

@hyperupcall
hyperupcall / settings.jsonc
Last active January 8, 2025 13:29
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@wojukasz
wojukasz / CHANGELOG.md
Last active April 6, 2025 15:44
VsCode + Vim keybindings and settings - best of both worlds

Changelog

All notable changes to this configuration will be documented in this file.

[1.0.0] - 2025-01-22

Added

  • Enhanced Git integration
    • Pull command: <leader>g p
  • Push command: g P
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 9, 2025 19:03
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
@davidteren
davidteren / nerd_fonts.md
Last active May 10, 2025 11:30
Install Nerd Fonts via Homebrew [updated & fixed]
@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2025 09:12
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@afiqiqmal
afiqiqmal / ALaravelPipelineReadme.md
Last active December 27, 2023 10:24
Laravel Query Filter using Pipeline

Donate

Laravel Query Filter using Pipeline

Basically, with a pipeline we can pass an object through a stack of tasks and get the result via a callback.

Refer Here -> https://laravel.com/api/7.x/Illuminate/Pipeline/Pipeline.html

The method handle used to execute the task receives two parameters, the first is the object that we passed to our pipeline, the second is a closure, where the object will be sent to run the next task.

@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 9, 2025 09:35
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@Ciantic
Ciantic / example-typeorm-jest.test.ts
Created April 16, 2019 17:50
Example of testing TypeOrm with Jest and Sqlite in-memory database
import { createConnection, getConnection, Entity, getRepository } from "typeorm";
import { PrimaryGeneratedColumn, Column } from "typeorm";
@Entity()
export class MyEntity {
@PrimaryGeneratedColumn()
id?: number;
@Column()
name?: string;
@mikowl
mikowl / oneliners.js
Last active February 19, 2025 05:20
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
@swalkinshaw
swalkinshaw / tutorial.md
Last active February 26, 2025 21:15
Designing a GraphQL API