Skip to content

Instantly share code, notes, and snippets.

View JustAShoeMaker's full-sized avatar
🖐️
Na! ;)

JustAShoeMaker

🖐️
Na! ;)
View GitHub Profile
@JustAShoeMaker
JustAShoeMaker / tmux.md
Last active February 5, 2023 18:17 — forked from russelldb/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@JustAShoeMaker
JustAShoeMaker / Ansible_Test_For_SSH_Without_SSH_Key
Last active June 24, 2020 18:33
A workround to test for SSH when you can't accept the key because this is your first time seeing the host, SSH isn't up.
# You can't test SSH access without erroring out because of the authenticity check.
3 It unsets key check and server fingerprint checking and then resets to be default
# empty args which will cause the server to prompt later on and get accepted explicity by operator.
# Your own environment may vary, so adjust.
#
# I couldnt find anything that didn't violate my sense of security, so it is disabled for the shortest
# possible time.
- name: unset host checking
set_fact:
# Sort a list of dictionary objects by a key - case sensitive
from operator import itemgetter
mylist = sorted(mylist, key=itemgetter('name'))
# Sort a list of dictionary objects by a key - case insensitive
mylist = sorted(mylist, key=lambda k: k['name'].lower())