Skip to content

Instantly share code, notes, and snippets.

View tinkerware's full-sized avatar

Cagatay Kavukcuoglu tinkerware

View GitHub Profile
@sts10
sts10 / rust-command-line-utilities.markdown
Last active April 25, 2024 03:57
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
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@wpbonelli
wpbonelli / dagster_start_pipeline_graphql.md
Last active June 11, 2020 22:11
Start Dagster pipeline via GraphQL API

GraphQL:

mutation ($executionParams: ExecutionParams!) {
  startPipelineExecution(executionParams: $executionParams) {
    ...startPipelineExecutionResultFragment
  }
}

fragment startPipelineExecutionResultFragment on StartPipelineExecutionResult {
@olix0r
olix0r / dargo
Last active November 4, 2019 03:28
#!/bin/sh
if [ $# -eq 0 ]; then
echo "usage: $0 [cargo options]" >&2
exit 64
fi
if [ ! -r Cargo.lock ]; then
echo "Not a cargo project: missing Cargo.lock" >&2
exit 1
@huzecong
huzecong / options.py
Last active September 1, 2023 18:24
A super-enhanced version of namedtuple that supports multiple inheritance and arbitrary field orders.
# Copyright (c) 2021 Zecong Hu
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
@kay
kay / jdk11-hsdis-ubuntu.sh
Last active August 9, 2020 11:31
Build HotSpot disassembler for JDK 11 and 12
# The following is based on a fresh Ubuntu 18.04.2 LTS with gcc, make and perl already
# installed (not that perl has anything to do with any of this..)
#
# This is based on JDK 11 but for JDK 12 I've confirmed it builds ok with binutils-2.29
# and binutils-2.32
apt install mercurial
# Be nice if this didn't check out the universe
hg clone http://hg.openjdk.java.net/jdk/jdk11/
cd jdk11/src/utils/hsdis/
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@fnky
fnky / ANSI.md
Last active April 25, 2024 19:35
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@cpuguy83
cpuguy83 / pull.go
Last active December 9, 2021 06:18
package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/images"