Skip to content

Instantly share code, notes, and snippets.

View foi's full-sized avatar

Alexander Kupchenko foi

View GitHub Profile
@foi
foi / promtail.yml
Created October 18, 2023 10:30
glusterfs promtail parse rules example
server:
http_listen_port: 9080
grpc_listen_port: 0
log_level: debug
positions:
filename: /var/promtail/positions.yaml
clients:
- url: http://127.0.0.1:3100/loki/api/v1/push
@foi
foi / gist:6c0f0418eabe2f41ea3f711e6288fefd
Created September 9, 2020 08:08
Создание репозитория для ASTRA LINUX 1.6 SMOLENSK
# Создаем папку для iso
sudo mkdir -p /iso
# Создаем папки с репозиториями (например такой путь):
sudo mkdir -p /mnt/REPOS/{ASTRALINUX_ORIGINAL,ASTRALINUX_UPDATE,ASTRALINUX_DEV_ORIGINAL,ASTRALINUX_DEV_UPDATE}
# Создаем простой веб сервер для репозитория /etc/systemd/system/repository-web-server.service
# в пункте After указываем тот mount, где у нас будут расположены ISO файлы с репозиториями - посмотреть список всех майнтов - sudo systemctl | grep mount. В примере ниже ISO файлы расположены на разделе с /, поэтому -.mount
[Unit]
Description=repository http server
After=-.mount
@foi
foi / gist:5319e11993fc84b6d2e3c5a871217967
Created August 13, 2020 13:25
Установка nextcloud 19 - nginx + php-fpm на ubuntu 20.04
# Устанавливаем зависимости
sudo su
apt-get install php zip libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip php-mysql php-bcmath php-gmp nginx php-fpm smbclient samba php-apcu php-opcache mariadb-server mariadb-client -y
# звдаем пароль для рута
mysql_secure_installation
# Создаем БД и Юзера и даем ему права
mysql -u root -p
CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'VsevolodOblako2121';
@foi
foi / 111.csv
Last active April 26, 2019 12:30
dssdsd
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
ddsdsd2112dfdff
@foi
foi / gist:68337d38c628b286d0f3811ca76aa815
Last active December 7, 2019 21:51
automatic install redmine on centos 7
yes | yum upgrade
yum install -y wget
# измените версию redmine, если нужно / change redmine version number if need
REDMINE_VERSION="3.4.6"
# установите язык для redmine / set redmine language
REDMINE_LANGUAGE="ru"
# выключаем анбшный даллас-лок / disable selinux because it's can theat proper working
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
# Устанавливаем rpm пакет с ruby
cd /tmp && wget https://github.com/feedforce/ruby-rpm/releases/download/2.4.4/ruby-2.4.4-1.el7.centos.x86_64.rpm
@foi
foi / arp-scan-monitor.js
Last active November 11, 2017 13:15
Track arp mac changes in network
const arpScanner = require('arpscan/promise')
const path = require('path')
const TCPJSONClientP = require(path.join(__dirname + "/..", "/services/abstract/TCPJSONClientP"))
const toRedis = new TCPJSONClientP()
const _ = require('lodash')
let results = []
if (process.argv[2]) {
# contents = File.read("2015.html")
contents = "---
layout: post
title: Astrofix. IC/Луна
date: '2015-09-06T22:05:13+00:00'
tags:
- astrofix
- ic
- 4 дом
@foi
foi / benchmark.md
Last active July 2, 2016 01:47
Updated results for https://github.com/mroth/phoenix-showdown (02.07.2016)
linux kernel 4.6.2
Core i7 3770
8GB DDR3 1600Mhz

Languages

ruby 2.3.1