Skip to content

Instantly share code, notes, and snippets.

View zmunk's full-sized avatar
😃

Ibrahim Tigrek zmunk

😃
View GitHub Profile
@zmunk
zmunk / zoxide-neovim.lua
Created November 8, 2025 08:04
Zoxide picker in neovim (using mini.pick)
local minipick = require("mini.pick")
local zoxide_picker = function()
local zoxide_output = vim.fn.system('zoxide query -l')
local zoxide_dirs = vim.split(zoxide_output, '\n', { trimempty = true })
-- open launcher to choose directory
-- once a directory is selected, open a second launcher to select a file
-- from directory using file picker
minipick.start({
source = {
@zmunk
zmunk / rebase-merge-conflicts.md
Created October 10, 2025 10:54
Resolving merge conflicts during rebase

Say we come across a merge conflict when rebasing a feature branch onto main.

We can see the conflict with git diff.

Example output:

diff --cc config.txt
index 0e7703e,904fdf4..0000000
--- a/config.txt
+++ b/config.txt
@zmunk
zmunk / create-lambda-layer.sh
Last active November 8, 2025 08:22
Script for creating an AWS lambda layer for a python library/libraries
#!/usr/bin/env bash
# To run this script directly from this gist, run the following command. Make sure to replace
# the arguments with your desired arguments.
#
# curl https://gist.githubusercontent.com/zmunk/2bc71b940d4a821b59ab073299de5f55/raw/create-lambda-layer.sh \
# | bash -s python3.11 schematichq pydantic pydantic_core schematic-py311-lambda-layer
# Exit the script immediately if any command returns a non-zero (failure) exit code.
set -e
@zmunk
zmunk / pipe-to-nushell.zsh
Created October 9, 2025 19:30
Nushell wrapper for piping into nushell from zsh
# Piping into Nushell
# Most of my workflow is in zsh, but I love using the tools provided by nushell.
# I created the following wrapper for the `nu` command to allow me to pipe into nushell at any point.
# For example, I can run any command in bash then pipe it to `nu` followed by any nu commands.
# ```
# aws lambda list-functions --query 'Functions' | nu 'from json | select FunctionName'
# ```
# usage: ls | nu 'lines'
@zmunk
zmunk / main.dart
Created January 26, 2020 16:41
Product to json string and back
import 'dart:convert';
void main() {
final p = Product(name: 'gofret', price: '\$1.00', imgUrl: 'img.com');
print(p);
print(p.runtimeType);
print("");
final j = json.encode(p);