Skip to content

Instantly share code, notes, and snippets.

View dRumata's full-sized avatar
✈️
I may be slow to respond.

Paul Voitelev dRumata

✈️
I may be slow to respond.
View GitHub Profile
#!/bin/bash
echo "[step 1] ====== Установка ПО"
sudo dnf install epel-release
sudo dnf install neovim git tmux mc curl ripgrep gcc neofetch duf cowsay fortune-mod -y
echo "[step 2] ====== Enable cockpit"
sudo systemctl enable --now cockpit.socket
systemctl status cockpit.service
echo "[step 3] ====== Tmux конфигурация"
@dRumata
dRumata / tmux-cheatsheet.markdown
Created September 26, 2023 15:49 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@dRumata
dRumata / .profile
Last active September 21, 2023 13:34
Linux Color Man Page config
export LESS_TERMCAP_mb=$'\e[1;34m' # begin bold
export LESS_TERMCAP_md=$'\e[1;32m' # begin blink
export LESS_TERMCAP_so=$'\e[01;44;37m' # begin reverse video
export LESS_TERMCAP_us=$'\e[01;36m' # begin underline
export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink
export LESS_TERMCAP_se=$'\e[0m' # reset reverse video
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
export GROFF_NO_SGR=1 # for konsole and gnome-terminal
export MANPAGER='less -s -M +Gg'
autocmd FileType yaml setlocal ai ts=2 sw=2 et
---
- name: Установка, запуск и проверка apache
hosts: servers
become: yes
tasks:
- name: Установка последней версии apache2
apt:
name: "apache2"
state: latest
update_cache: yes
<?php print("Hello World")?>
@dRumata
dRumata / RH342.md
Created October 10, 2022 12:29 — forked from luckylittle/RH342.md
Red Hat RH342 Notes

Red Hat Enterprise Linux Diagnostics & Troubleshooting (RH342)

Last update: Fri Jul 26 08:23:20 UTC 2019 by @luckylittle


1. Troubleshooting principles

2. Generic issues

@dRumata
dRumata / fedora-nat.sh
Created October 5, 2022 13:12
NAT on Fedora
#!/bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
sysctl -w net.ipv4.ip_forward=1
firewall-cmd --add-masquerade --permanent
firewall-cmd --add-forward --permanent
firewall-cmd --reload
@dRumata
dRumata / forwarding.sh
Last active October 25, 2022 01:14
How to make forwarding in Debian
#!/bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r