Skip to content

Instantly share code, notes, and snippets.

View sub314xxl's full-sized avatar

Konstantin Mokhnatkin sub314xxl

  • Moscow, Russian Federation
View GitHub Profile
@sub314xxl
sub314xxl / systemd_service_hardening.md
Created October 14, 2023 18:14 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@sub314xxl
sub314xxl / install-discord.bash
Created June 21, 2023 15:14 — forked from lnoering/install-discord.bash
Install discord (for the .tar.gz)
#!/usr/bin/env bash
cd ~/
mkdir -p ~/.local/bin
wget "https://discordapp.com/api/download/canary?platform=linux&format=tar.gz" -O discord.tar.gz
tar -xvf discord.tar.gz -C ~/.local/bin
sudo ln -s ~/.local/bin/DiscordCanary/discord.png /usr/share/icons/discord.png
sudo ln -s ~/.local/bin/DiscordCanary/DiscordCanary /usr/bin
wget https://gist.githubusercontent.com/AdrianKoshka/a12ca0bfe2f334a9f208aff72f8738c3/raw/9d606ad7ce7cc1dd23f6a99993e2396540538a02/discord.desktop -O discord.desktop
mkdir -p ~/.local/share/applications/
mv ~/discord.desktop ~/.local/share/applications/
@sub314xxl
sub314xxl / bash-cheatsheet.sh
Created May 29, 2023 12:39 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@sub314xxl
sub314xxl / .bashrc
Created May 29, 2023 10:28 — forked from michaelklapper/.bashrc
Color up your bash history with the date time information of called commands.
MY_BASH_BLUE="\033[0;34m" #Blue
MY_BASH_NOCOLOR="\033[0m"
HISTTIMEFORMAT=`echo -e ${MY_BASH_BLUE}[%F %T] $MY_BASH_NOCOLOR `
HISTSIZE=20000
HISTFILESIZE=20000
@sub314xxl
sub314xxl / laptop_unsuck.json
Created May 2, 2023 17:30 — forked from sebastian-de/laptop_unsuck.json
easyeffects preset to improve the sound of the built-in speakers on a Thinkpad P14s Gen 2 AMD. Based on the excellent guide by Markus Schmidt.
{
"output": {
"bass_enhancer": {
"amount": 22.0,
"blend": 0.0,
"floor": 10.0,
"floor-active": true,
"harmonics": 9.999999999999995,
"input-gain": 0.0,
"output-gain": -8.0,
@sub314xxl
sub314xxl / readme.txt
Created April 10, 2023 06:06 — forked from mowings/readme.txt
haproxy timing events
Timers provide a great help in troubleshooting network problems. All values are
reported in milliseconds (ms). These timers should be used in conjunction with
the session termination flags. In TCP mode with "option tcplog" set on the
frontend, 3 control points are reported under the form "Tw/Tc/Tt", and in HTTP
mode, 5 control points are reported under the form "TR/Tw/Tc/Tr/Ta". In
addition, three other measures are provided, "Th", "Ti", and "Tq".
Timings events in HTTP mode:
first request 2nd request
@sub314xxl
sub314xxl / README.md
Created April 28, 2022 14:10 — forked from developius/README.md
Setup SSH keys for use with GitHub/GitLab/BitBucket etc
@sub314xxl
sub314xxl / oom-killer.yml
Created February 8, 2022 08:52 — forked from stewartpark/oom-killer.yml
Userspace Early OOM Killer for Kubernetes Nodes
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: oom-killer
namespace: kube-system
labels:
k8s-app: oom-killer
spec:
selector:
@sub314xxl
sub314xxl / bash_strict_mode.md
Created January 29, 2022 00:09 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation