Skip to content

Instantly share code, notes, and snippets.

View shmidtelson's full-sized avatar
💻
I do so as much as i can

Roman Sapezhko shmidtelson

💻
I do so as much as i can
View GitHub Profile
@shmidtelson
shmidtelson / send-invites.js
Last active March 25, 2024 09:53
Linkedin invite sender
/**
@description Auto-adding connections in linkedin
@instruction Open url https://www.linkedin.com/search/results/people/ and type your query.
When you see the result, you should paste the code (below) into the console of your browser and press enter.
This bot can add connections automatically, and it also uses page pagination.
When you reach the weekly limit, the bot will stop.
*/
const currentLanguage = document.querySelector('html').lang
const languageMap = {
@shmidtelson
shmidtelson / parse.py
Created October 21, 2021 20:41
Парсим занятия mkr.udau.edu.ua
import json
from pprint import pprint
import requests
import re
from bs4 import BeautifulSoup
url = 'http://mkr.udau.edu.ua/time-table/group?type=1'
# Параметры для получения данных
data = {
@shmidtelson
shmidtelson / nginx.conf
Last active October 21, 2021 20:46
Wordpress paranoid safe settings
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@shmidtelson
shmidtelson / php.cache.dist.php
Created September 10, 2020 18:13
php.cache.dist
<?php
$finder = PhpCsFixer\Finder::create()
->exclude(['public', 'var', 'vendor', 'bin'])
->notPath('*')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
@shmidtelson
shmidtelson / qwe
Last active November 15, 2019 14:17
qweqwe
import reducer, { initialState } from './reducer'
import * as t from './actionTypes'
describe('session reducer', () => {
it('should return the initial state', () => {
expect(reducer(undefined, {})).toEqual(initialState)
})
it('LOG_IN_REQUEST', () => {
const action = { // РАБ СИСТЕМЫ // САМ РАБ
@shmidtelson
shmidtelson / docker-compose.yml
Created November 9, 2019 20:36
Host Mariadb with phpmyadmin
# Add user with host 172.18.0.1 then connect to database
# 172.18.0.1 - if localhost connection
version: '3.7'
services:
mariadb:
image: 'bitnami/mariadb:latest'
environment:
- MARIADB_ROOT_PASSWORD=root
volumes:
- 'mariadb_data:/bitnami'
@shmidtelson
shmidtelson / kibana.yml
Created October 23, 2019 07:36
Kibana generated config
#
# ** THIS IS AN AUTO-GENERATED FILE **
#
# Default Kibana configuration for docker target
server.name: kibana
server.host: "0"
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
xpack.monitoring.ui.container.elasticsearch.enabled: true
Здравствуйте.
Один из IP-адресов вашего виртуального сервера заблокирован. Автоматическая система мониторинга зафиксировала аномальный входящий трафик на IP-адрес 212.109.193.210 в течение последних 10 минут: средняя скорость 242.1 M бит в секунду со средним размером пакета 1207 байт. Такая нагрузка нарушает работу сети и создает проблемы другим клиентам дата-центра.
Основные источники трафика:
lb-140-82-118-6-ams.github.com (140.82.118.6) TCP 3.5M байт с размером пакета 1415 байт на 49942 порт.
lb-140-82-118-6-ams.github.com (140.82.118.6) TCP 3.3M байт с размером пакета 1415 байт на 49938 порт.
lb-140-82-118-6-ams.github.com (140.82.118.6) TCP 1.8M байт с размером пакета 1405 байт на 49940 порт.
mail.shared-24.smartape.ru (188.127.230.8) UDP 984000 байт с размером пакета 41 байт на 27015 порт.
ns505468.ip-192-99-101.net (192.99.101.31) UDP 984000 байт с размером пакета 41 байт на 27015 порт.
ns505468.ip-192-99-101.net (192.99.101.31) UDP 984000 байт с размером пакета 41 байт на 27015 порт.
mail.shared-24.sm
@shmidtelson
shmidtelson / interceptor.js
Created September 6, 2019 08:47
Update refresh token
createAxiosResponseInterceptor() {
const interceptor = axios.interceptors.response.use(
response => response,
error => {
// Reject promise if usual error
if (errorResponse.status !== 401) {
return Promise.reject(error);
}
/*
import requests
from bs4 import BeautifulSoup
resp = requests.get("http://static.feed.rbc.ru/rbc/logical/footer/news.rss")
soup = BeautifulSoup(resp.content)
items = soup.findAll('item')
for item in items:
print(item.title.text.replace("<![CDATA[", "").replace("]]>", ""))