Skip to content

Instantly share code, notes, and snippets.

View andrewgazelka's full-sized avatar
🤖

Andrew Gazelka andrewgazelka

🤖
View GitHub Profile
@sts10
sts10 / rust-command-line-utilities.markdown
Last active September 21, 2026 10:09
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
@BuonOmo
BuonOmo / .gitconfig
Last active July 14, 2026 11:49
Git blame color scale from 20 month ago to now (https://stackoverflow.com/a/66250482/6320039)
[color "blame"]
highlightRecent = 234, 23 month ago, 235, 22 month ago, 236, 21 month ago, 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226
[blame]
coloring = highlightRecent
date = human
@aeporreca
aeporreca / test.tex
Last active October 2, 2023 17:34
Using 💪 (or any other emoji) as QED symbol in LaTeX under macOS (compile with LuaLaTeX)
% Code inspired by https://tex.stackexchange.com/q/520968
% Compile with LuaLaTeX (or, I think, XeLaTeX if you don't need Harfbuzz)
\documentclass{article}
\usepackage{fontspec}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newfontfamily{\emoji}{Apple Color Emoji}[Renderer=Harfbuzz]
% I think it's just \newfontfamily{\emoji}{FontName} for other fonts
@amir-saniyan
amir-saniyan / EmbedResource.cmake
Last active May 27, 2025 03:31
Pure CMake function to convert any file into C/C++ source code, implemented with only CMake commands.
####################################################################################################
# This function converts any file into C/C++ source code.
# Example:
# - input file: data.dat
# - output file: data.h
# - variable name declared in output file: DATA
# - data length: sizeof(DATA)
# embed_resource("data.dat" "data.h" "DATA")
####################################################################################################
@imGurpreetSK
imGurpreetSK / allowStructuredMapKeysExample.kt
Created May 3, 2020 05:35
Example for allowStructuredMapKeys property in JsonConfiguration
@Test
fun `allowStructuredMapKeys allows json with non-primitive keys to be parsed successfully`() {
@Serializable
data class Contacts(
val contacts: Map<Int, Map<Map<Int, Int>, String>>
)
val contacts = Contacts(
linkedMapOf(
1 to mapOf(mapOf(1 to 1) to "Gurpreet"),
2 to linkedMapOf(mapOf(2 to 2) to "value")
/*
MIT License
Copyright (c) 2020 Camden B
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@heyimblake
heyimblake / bst.c
Last active January 26, 2020 06:26
C Binary Search Tree Implementation. Adding, searching, ordering, and tree deletion included.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
// Node Structure
typedef struct node {
// Ordered from grestest member size to smallest member size for reducing memory used.
struct node *left; // Pointer pointing to left child node.
struct node *right; // Pointer pointing to right child node.
int val; // The value the node is holding.
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active September 14, 2026 13:34
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@andrewgazelka
andrewgazelka / CMakeLists.txt
Created March 23, 2018 17:47 — forked from antonagestam/CMakeLists.txt
CLion and Arduino via Platform.io
cmake_minimum_required(VERSION 3.2)
project(YourProject)
add_subdirectory(src)
add_subdirectory(lib)
@jan-warchol
jan-warchol / sync-history.sh
Last active May 27, 2026 08:57
Synchronize history across bash sessions
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.