Skip to content

Instantly share code, notes, and snippets.

@sakkas-zendesk
sakkas-zendesk / README.md
Last active June 28, 2023 20:24
Manage your symlinks in your dotfiles or anywhere [Ruby]

How to

You might need to modify default path for your symlink sources and destinations as per your preferences.

# Where we keep the original files which we track in Git
SRC_BASE = HOME + "/.dotfiles/symlinker/files/"
# Where we place them by default, if there is no override
DST_BASE = HOME + "/"
@sakkas-zendesk
sakkas-zendesk / aws-sigv4-ssm-get-parameter.sh
Created February 4, 2022 07:57 — forked from slawekzachcial/aws-sigv4-ssm-get-parameter.sh
Using CURL to call AWS ReST API, signing request with v4 signature
#!/bin/bash
# Source: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
[[ -n "${AWS_ACCESS_KEY_ID}" ]] || { echo "AWS_ACCESS_KEY_ID required" >&2; exit 1; }
[[ -n "${AWS_SECRET_ACCESS_KEY}" ]] || { echo "AWS_SECRET_ACCESS_KEY required" >&2; exit 1; }
readonly parameterName="SlawekTestParam"
readonly method="POST"
@sakkas-zendesk
sakkas-zendesk / .gitattributes
Created August 11, 2022 03:37 — forked from phil-blain/.gitattributes
Git pickaxe : show only relevant hunks (filter displayed hunks using the given search string)
*.md diff=markdown
@sakkas-zendesk
sakkas-zendesk / claimant-down-operation.md
Last active November 30, 2022 09:30 — forked from shino/claimant-down-operation.md
Operation steps when claimant node is down in Riak cluster

Created 3-node healthy cluster. Node dev1 is claimant at this point.

% dev/dev1/bin/riak-admin member-status
================================= Membership ==================================
Status     Ring    Pending    Node
-------------------------------------------------------------------------------
valid      50.0%      --      '[email protected]'
valid      25.0%      --      '[email protected]'
valid      25.0%      --      '[email protected]'
@sakkas-zendesk
sakkas-zendesk / .gitignore
Last active March 2, 2023 03:53
simple cpu benchmark for nodejs
node_modules
@sakkas-zendesk
sakkas-zendesk / kafkacat.adoc
Created October 9, 2023 04:52 — forked from rmoff/kafkacat.adoc
Show last three messages from a Kafka topic with kafkacat
kafkacat -b localhost:9092 \
         -t _kafka-connect-group-01-status \
         -C \
         -o-3 \
         -c3 \
         -f 'Topic %t / Partition %p / Offset: %o / Timestamp: %T\nHeaders: %h\nKey (%K bytes): %k\nPayload (%S bytes): %s\n--\n'

How to easily checkout branches into new worktree directories

Worktree-demo

See the gif file below if the gist does not render the screen capture in this markdown document.

  1. git worktree-add <branch-name> to add the worktree.
  2. gcd and hit enter, let fzf to choose and cd into the directory.
  3. When you're done, git worktree-remove-picked to remove selected worktree and the files from your disk.