Skip to content

Instantly share code, notes, and snippets.

@anthonyaxenov
anthonyaxenov / stacktrace.sh
Last active June 28, 2023 14:10 — forked from akostadinov/stack_trace.sh
[SHELL] Print stacktrace
# Original: https://gist.github.com/akostadinov/33bb2606afe1b334169dfbf202991d36
# The difference is that this func outputs stacktrace in reverse order (from top level to lower ones)
function print_stacktrace () {
STACK=""
local i
local stack_size=${#FUNCNAME[@]}
echo "Stacktrace:"
# skip this function and "MAIN non_file_source:0"
for (( i=$stack_size-1; i>=1; i-- )); do
local func="${FUNCNAME[$i]}"
@anthonyaxenov
anthonyaxenov / zsh-fancify.sh
Last active May 13, 2022 15:58 — forked from AlexZeitler/setup-oh-my-zsh-powerlevel9k.sh
Installing zsh / oh-my-zsh / Powerlevel10k on Ubuntu 20.04
#!/bin/bash
# Based on:
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions
# https://github.com/ohmyzsh/ohmyzsh
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/
echo "*********************************************"
echo " zsh fancifier"