Skip to content

Instantly share code, notes, and snippets.

View fiskhest's full-sized avatar

fiskhest fiskhest

View GitHub Profile
@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@ciiqr
ciiqr / dispatch.sh
Last active May 3, 2024 19:47
github actions, repository_dispatch with client_payload
# TODO: replace :token, :user, and :repo
curl -H "Authorization: token :token" \
-H 'Accept: application/vnd.github.everest-preview+json' \
"https://api.github.com/repos/:user/:repo/dispatches" \
-d '{"event_type": "awesomeness", "client_payload": {"foo": "bar"}}'
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active May 4, 2024 21:09
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@drasill
drasill / bspwmrc
Last active November 3, 2022 10:29
bspwm : External Rules & Config for right-stacked windows
#! /bin/sh
# ~/.config/bspwm/bspwmrc
#...
bspc config external_rules_command ~/.config/bspwm/scripts/external_rules.sh
@MilesMcBain
MilesMcBain / rofi.cfg
Created July 17, 2018 02:19
vim like keys for rofi
rofi.kb-row-up: Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab
rofi.kb-row-down: Down,Control+j
rofi.kb-accept-entry: Control+m,Return,KP_Enter
rofi.terminal: mate-terminal
rofi.kb-remove-to-eol: Control+Shift+e
rofi.kb-mode-next: Shift+Right,Control+Tab,Control+l
rofi.kb-mode-previous: Shift+Left,Control+Shift+Tab,Control+h
rofi.kb-remove-char-back: BackSpace
# Bash best practices and style-guide
Just simple methods to keep the code clean.
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/).
## Quick big rules
* All code goes in a function
* Always double quote variables
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@rponte
rponte / get-latest-tag-on-git.sh
Last active March 11, 2024 07:50
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples