Skip to content

Instantly share code, notes, and snippets.

View sub314xxl's full-sized avatar

Konstantin Mokhnatkin sub314xxl

  • Moscow, Russian Federation
View GitHub Profile
“Вот что наука говорит о максимизации жизни (What science says about maximizing life):
- Ешьте реже. (Eat less often.)
- Избегайте сахара и продуктов с высоким ГИ. Ешьте растения, у которых был стресс. (Avoid sugar & high GI foods. Eat stressed plants.)
- Делайте упражнения “hip-hinge”, растяжку, “доведите себя до одышки” несколько раз в неделю. (Do hip-hinge exercises, stretch, pant a few times a week.)
- Заблокируйте синий свет. Спите хорошо. (Block blue light. Sleep well.)
- Успокойте свой ум, никогда не лгите, не ненавидьте. (Calm your mind, never lie, don't hate.)
- Имейте близких друзей и домашних животных. (Have close friends & pets.)”
@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 / arch-pacage-list-.sh
Created February 28, 2022 18:49
Arch Packages List
export paclist="comm -23 <(pacman -Qqett | sort) <(pacman -Qqg base -g base-devel | sort | uniq)"
@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
#!/usr/bin/perl
use strict;
use warnings;
my @dmesg_new = ();
my $dmesg = "/bin/dmesg";
my @dmesg_old = `$dmesg`;
my $now = time();
my $uptime = `cat /proc/uptime | cut -d"." -f1`;
@sub314xxl
sub314xxl / jq-cheetsheet.md
Created November 30, 2021 19:42 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@sub314xxl
sub314xxl / .gitignore
Created November 7, 2021 22:13 — forked from jeosadn/.gitignore
Convert YouTube subscriptions exported via Google Takeout into OPML
*~
@sub314xxl
sub314xxl / gpg-cleanup-cron.sh
Created August 15, 2021 23:29
GnuPG Keyring Weekly Cleanup
#!/bin/bash
# Clean up the GPG Keyring. Keep it tidy.
# blog.lavall.ee
echo -n "Expired Keys: "
for expiredKey in $(gpg2 --list-keys | awk '/^pub.* \[expired\: / {id=$2; sub(/^.*\//, "", id); print id}' | fmt -w 999 ); do
echo -n "$expiredKey"
gpg2 --batch --quiet --delete-keys $expiredKey >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo -n "(OK), "
@sub314xxl
sub314xxl / awscli_v2_ubuntu.md
Created August 2, 2021 18:58 — forked from ruanbekker/awscli_v2_ubuntu.md
Install AWS CLI Version 2 on Ubuntu 20
$ apt update
$ apt search awscli
$ apt install curl wget unzip -y
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ ./aws/install
$ aws --version
aws-cli/2.1.28 Python/3.8.8 Linux/4.19.121-linuxkit exe/x86_64.ubuntu.20 prompt/off