Skip to content

Instantly share code, notes, and snippets.

View anviar's full-sized avatar
🕊️
surviving

Oleg Klyuchkin anviar

🕊️
surviving
View GitHub Profile
@anviar
anviar / publish.py
Created May 4, 2018 13:02
Script to publish things on various platforms
#!/usr/bin/env python3
import os
import yaml
import argparse
import subprocess
import logging
os.chdir(os.path.dirname(os.path.realpath(__file__)))
@anviar
anviar / pxelinux.cfg
Created May 5, 2018 07:30
Configuration file for PXE server
DEFAULT menu.c32
MENU TITLE Quick home network menu
# Menus
LABEL Ubuntu
KERNEL ubuntu/linux
APPEND initrd=ubuntu/initrd.gz
LABEL KolibriOS
KERNEL memdisk
APPEND initrd=kolibri.img
LABEL Memtest86+
@anviar
anviar / ddns
Created May 6, 2018 18:47
Microtik no-ip update script. Require read and write permissions
:local NOIPUser "username"
:local NOIPPass "serRetPasswwwwoD"
:local NOIPDomain "example.com"
:local WANInter [/interface get [ find type=pppoe-out running] name ]
:local IpCurrent [/ip address get [ find interface=$WANInter ] address ]
:local NOIPaddr [:resolve $NOIPDomain]
:for i from=( [:len $IpCurrent] - 1) to=0 do={
:if ( [:pick $IpCurrent $i] = "/") do={
@anviar
anviar / godaddy.cfg
Created May 8, 2018 19:43
GoDaddy API sample
[godaddy]
api_key =
api_secret =
root_domain =
API_ROOT = https://api.godaddy.com/v1
[test]
sub_domain =
service_url =
ips = 127.0.0.1, 127.0.0.2
method = get
@anviar
anviar / generate_request.py
Last active May 14, 2018 11:15
SSL request automation
# -*- coding: utf-8 -*-
import os
from argparse import ArgumentParser, ArgumentTypeError
import subprocess
from string import Template
import re
from platform import system
import pyperclip
from time import ctime
@anviar
anviar / backup.conf
Created May 17, 2018 13:29
Amazon S3 backup tool
[general]
workdir=/var/backups
keep=True
[amazon]
aws_access_key_id=OLOLO
aws_secret_access_key=AHAHA
bucket=MYBUCKET
region=MARS-1
@anviar
anviar / bynary_time.py
Created November 13, 2018 23:17
List of Braille characters for clock
binary_time = [
# 0
u'⠀',
# 1
u'⢀',
# 2
u'⠠',
# 3
u'⢠',
# 4
@anviar
anviar / redis-info.py
Last active January 18, 2019 08:18
Redis statistics extractor for collectd exec plugin
#!/opt/rh/rh-python36/root/usr/bin/python3 -u
from redis import Redis
from os import getenv
from platform import node
from time import sleep
hostname = getenv('COLLECTD_HOSTNAME', default=node())
interval = int(float(getenv('COLLECTD_INTERVAL', default=60)))
@anviar
anviar / mail_telegram.py
Created January 30, 2019 13:19
Idea how to deliver mails to telegram channel
#!/usr/bin/env python3
import email
import sys
import telegram
import logging
logging.basicConfig(
format='[%(levelname)s] %(message)s',
level=logging.DEBUG)
@anviar
anviar / config.ini.example
Last active February 20, 2019 10:03
Headhunter resume updater
[main]
verbose=DEBUG
[selenium]
startup_timeout=5
jar=selenium-server-standalone-3.141.59.jar
[hh]
username=
password=