Skip to content

Instantly share code, notes, and snippets.

@dynax60
dynax60 / gist:20db6377595b8df0d68e3ae1ec08d238
Created February 12, 2024 07:11
Clear kannel's redis store
stop all
redis-cli -n 0 FLUSHDB
systemctl restart kannel-bearerbox
https://stackoverflow.com/questions/9500848/how-do-i-read-this-complex-declaration-in-c/9501054#9501054
https://cdecl.org/?q=void+%28*signal%28int%2C+void%28*%29%28int%29+%29%29%28int%29
@dynax60
dynax60 / smpp_dlr_ecodes.tsv
Created June 21, 2023 10:29
SMPP Delivery Receipt Error Codes
1 MT number is unknown in the MT network’s HLR
2 MT number is unknown in the MT network’s HLR
5 MT number is unknown in the MT network’s MSC
9 MT number is classed as an illegal subscriber in the MT network’s MSC
11 MT HLR sends back a “Teleservice not provisioned” error in responseto the SRI
12 MT handset is listed as an Illegal device on the MSC.
13 Customer is barred according to the MT HLR from receiving SMS
15 MT customer is part of a CUG that is not allowed to receive SMS
21 SMS not supported in the MT network.
22 SMS not supported in the MT MSC
@dynax60
dynax60 / backup.sh
Created May 29, 2023 06:27
Simple site change tracker
#!/bin/bash
PATH=/usr/bin:/usr/sbin
# Установка переменных
SITE_DIRECTORY="/var/www/mysite.ru" # Путь к директории сайта
BACKUP_DIRECTORY="/opt/git/site" # Путь к директории для сохранения бэкапов
EMAIL_RECIPIENT="mysite@mysite.ru" # Адрес получателя электронной почты
MAX_DIFF_SIZE=$((10 * 1024)) # 10 Кб в байтах
# Создание временной директории для выполнения операций
@dynax60
dynax60 / subnets.pl
Created February 3, 2023 09:15
Script to get subnets in CIDR notation for the selected countries
#!/usr/bin/perl
# dnf install perl-Net
# wget ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.inetnum.gz
# wget https://ftp.apnic.net/apnic/whois/apnic.db.inetnum.gz
# zcat ripe.db.inetnum.gz | ./subnets.pl RU BY
# zcat apnic.db.inetnum.gz | ./subnets.pl MN
use Net::CIDR qw(range2cidr);
use Symbol;
use strict;
@dynax60
dynax60 / oh-my-zsh
Created January 18, 2017 14:57
Oh-my-zsh on OpenBSD
export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.0/packages/i386
$ sudo pkg_add -v zsh-4.3.12 git-1.7.6p0
$ chsh -s /usr/local/bin/zsh
$ git clone git://github.com/robbyrussell/oh-my-zsh.git
$ mv oh-my-zsh .oh-my-zsh
$ cp .oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
@dynax60
dynax60 / install-hpe-sdr.yml
Last active March 30, 2022 07:01
Example of ansible playbook for hp proliant gen10
---
- hosts: node1
become: yes
roles:
- role: ansible-role-hpe-common
- role: ansible-role-hpe-spp
hpe_spp_packages:
- amsd
- hponcfg
- ssacli
@dynax60
dynax60 / cleaning.md
Last active October 25, 2021 13:11
Ansible playbook for installing Gitlab

Remove exited containers

docker ps -a -q -f status=exited | xargs --no-run-if-empty docker rm -v

Remove dangling images

docker images -f "dangling=true" -q | xargs --no-run-if-empty docker rmi

Remove unused images (warning!)

docker images | awk '/ago/ { print $3}' | xargs --no-run-if-empty docker rmi

Remove dangling volumes

https://12factor.net/ru/
https://www.redhat.com/architect/12-factor-app
https://kubernetes.io/
https://kubespray.io/
https://kube101.jeffgeerling.com/
https://www.youtube.com/watch?v=Mw_rEH2pElw&list=PL8D2P0ruohOBSA_CDqJLflJ8FLJNe26K-
https://www.netmeister.org/blog/tlds.html
https://www.netmeister.org/misc/zonestats.pl
https://czds.icann.org/home