Skip to content

Instantly share code, notes, and snippets.

View andrew-werdna's full-sized avatar

Andrew Brown andrew-werdna

  • Austin, Texas
  • 02:45 (UTC -05:00)
View GitHub Profile
@mbbx6spp
mbbx6spp / git-tips-part-1.org
Last active April 29, 2023 02:17
Git tips and tricks for dev group presentation

Git Tips

Config

Git has different levels of configuration that apply to different /”scopes”/:

  • system (almost never needed; not covered here)
  • global (which is /”global for a user”/ scoped)
  • local (which is specific to one local clone)
  • worktree (which only applies to the current worktree; only relevant if you work with worktree s)
  • file (not covered here but you can set a git configuration option, when relevant at the file level, to one file)
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@nat-418
nat-418 / a-basic-home-manager.md
Last active May 16, 2024 20:49
An example Home Manager configuration

A basic Home Manager configuration

These files show a simplified real-world example of how to use Home Manager to setup Neovim, Xfce, and some command-line user tools.