Skip to content

Instantly share code, notes, and snippets.

View radimih's full-sized avatar

Radimir Mikhailov radimih

  • IT2G
  • Russia, Kemerovo
View GitHub Profile
@vncsna
vncsna / bash_strict_mode.md
Created June 6, 2021 01:59 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@windwp
windwp / i3-swallow.py
Last active January 4, 2023 11:27
i3-swallow used to swallow a terminal window in i3
#!/usr/bin/env python3
#-----------------------------------------------
# used to swallow a terminal window in i3
#
# INSTALL
# Install python 3 and install i3ipc libary
# pip3 install i3ipc
# download this scrript and put it to your i3 config folder and run
@ertwro
ertwro / i3.config
Last active March 25, 2020 04:39
scratchpad script to either hide, show or open programs.
# modes structure
# $Mod+Tab
set $mode_Tab Mode and more
bindsym $mod+Tab mode "$mode_Tab"
mode "$mode_Tab"{
bindsym $mod+h exec `notify-send 'H'`
bindsym $mod+j exec `notify-send 'J'`
bindsym $mod+k exec `notify-send 'K'`
bindsym $mod+l exec `notify-send 'L'`
@diffficult
diffficult / qr_clip.sh
Created April 9, 2017 03:42
Small script written by someone that outputs as a QR code whatever you have on your clipboard at the time
#!/bin/bash
#
# This script will output a QR Code made with whatever you have loaded on your clipboard
# You need qrencode C Library and xclip for this script to work
#
function err {
echo -e "[ERROR] in line ${BASH_LINENO[0]}"
[[ $1 ]] && echo "[ MSG ] $1"
exit 1
}
@alces
alces / ansible_local_playbooks.md
Last active June 13, 2024 02:02
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@zchee
zchee / actionlist.vim
Last active June 20, 2024 06:03
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>