Skip to content

Instantly share code, notes, and snippets.

View teymurov27's full-sized avatar
:octocat:
Sleeping ...

Samir Teymurov teymurov27

:octocat:
Sleeping ...
View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 22, 2026 14:41
set -e, -u, -o, -x pipefail explanation
@holmberd
holmberd / linux-kill-pts.md
Last active August 14, 2025 09:24
Kill tty/pts sessions in Linux

Kill user tty/pts sessions in Linux

Commands

  • w: show who is logged on and what they are doing
  • who: show who is logged on
  • tty: show current users pseudo terminal
  • ps -ft pts/1: get process id for the pseudo terminal
  • pkill: signal process based on name and other attributes
@miki725
miki725 / docker_attach
Created July 6, 2014 17:26
Attach to docker container via nsenter
#!/bin/bash
USAGE="Attach to Docker Container
--------------------------
Attach to Docker Container even if the container does not run
ssh daemon. This is accomplished by using linux containers
directly via 'nsenter' (see http://bit.ly/docker_nsenter).
To install 'nsenter', just execute:
$ docker run -v /usr/local/bin:/target jpetazzo/nsenter