Skip to content

Instantly share code, notes, and snippets.

View islander's full-sized avatar

kiba islander

  • Innova Distribution
  • Moscow | Saint Petersburg
View GitHub Profile
@islander
islander / mindbox-hh.yaml
Last active October 10, 2020 11:31
mindbox headhunter test deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: mindbox
namespace: mindbox
spec:
# 4 пода, которые справляются с нагрузкой
replicas: 4
# 5-10 секунд на инцициализацию
minReadySeconds: 10

docker-compose as systemd service

$ sudo cp [email protected] /etc/systemd/system
$ sudo systemctl daemon-reload
$ sudo systemctl enable docker-compose@mongodb

$ sudo systemctl start docker-compose@mongodb

@islander
islander / install-statsd-debian.md
Created March 24, 2020 00:07
Install StatsD on Debian Stretch

Install StatsD on Debian Stretch

Install nodejs:

# curl -sL https://deb.nodesource.com/setup_12.x | bash -
# apt install -y nodejs

Install build dependencies:

$ sudo apt install git debhelper devscripts dh-systemd

@islander
islander / proxmox6-debian-playbook.yml
Created March 5, 2020 01:28
Convert Debian 10 to Proxmox Virtual Environment 6. Ansible playbook.
---
- name: Add proxmox gpg key
apt_key:
url: http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg
state: present
- name: Add proxmox repository
lineinfile:
path: /etc/apt/sources.list
line: deb http://download.proxmox.com/debian/pve buster pve-no-subscription
@islander
islander / cronlist.sh
Last active November 1, 2024 23:01 — forked from Zitrax/cronlist.sh
Script to list all cron events on a system - found on stackoverflow.com: http://bit.ly/nkFwD9 Modified from original to list /etc/anacron jobs
#!/bin/bash
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
ANACRONTAB='/etc/anacrontab'
CRONDIR='/etc/cron.d'
# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")
@islander
islander / valid_ip.sh
Created December 24, 2019 02:33
Bash function for validating IPv4 address
#!/bin/bash
function valid_ip()
{
local ip=$1
local stat=1
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
IFS='.' read -ra ip <<< "$ip"
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 \
@islander
islander / README.md
Last active September 28, 2020 10:34
Local Minikube cluster using QEMU hypervisor

Local Minikube cluster using QEMU hypervisor

Script for installing minikube cluster using QEMU/KVM hypervisor.

Supported OS

  • Ubuntu 18.04, 20.04 (tested)
  • Debian 10 (not yet tested)
  • CentOS 7
@islander
islander / forcero.sh
Last active November 11, 2019 02:51
Linux SysRq examples
#!/bin/sh
# Remount all filesystems read-only
echo "sync disks."
echo s > /proc/sysrq-trigger
sleep 2
echo "remount all read-only."
@islander
islander / drop-scsi.sh
Created October 29, 2019 23:59
Linux SATA hotswap
#!/bin/sh
if test -h "$1"
then
disk=$(chase "$1")
else
disk="$1"
fi
if test -b "$disk"
[local]Redback# washoutthewash
[CUSTOMER_1194]Redback# show sub act
[email protected]
Session state Up
Circuit 14/1:1 vpi-vci 1 928
Internal Circuit 14/1:1:63/1/2/1407
Interface bound pppoe
Current port-limit 1
ppp mtu 1508 (applied)