Skip to content

Instantly share code, notes, and snippets.

View mwaitzman's full-sized avatar

mwaitzman

  • 'merica
View GitHub Profile
@jednano
jednano / gitcom.md
Last active May 31, 2023 08:23
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@erikw
erikw / snp
Last active December 24, 2023 06:11
snp: Wrap shell command in BTRFS snapper pre-post snapshots and log outputs.
#!/usr/bin/env bash
# Runs a command wrapped in btrfs snapper pre-post snapshots.
# Usage: $ snp <commands>
# e.g.: $ snp pacman -Syyu
# Requirements: snapper (https://wiki.archlinux.org/title/snapper)
# The latest version of this script is hosted at https://gist.github.com/erikw/5229436
log_path="/var/local/log/snp"
date=$(date "+%Y-%m-%d-%H%M%S")
log_file="${log_path}/snp_${date}.log"
@roachhd
roachhd / README.md
Last active June 15, 2024 17:09
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@brev
brev / unix_cookbok.md
Last active August 25, 2022 14:10
Unix Cookbook

Unix Cookbook

System

Find system naming:

uname  # os
uuname -l  # short
uname -a # detailed
@ipbastola
ipbastola / jq to filter by value.md
Last active June 5, 2024 09:07
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active June 15, 2024 01:44
Hyperlinks in Terminal Emulators
@fnky
fnky / ANSI.md
Last active June 16, 2024 12:02
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@romkatv
romkatv / Pure style for Powerlevel10k.md
Last active May 4, 2024 16:34
Pure style for Powerlevel10k

Powerlevel10k can generate the same prompt as Pure.

pure

Installation

git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc