Skip to content

Instantly share code, notes, and snippets.

View linuxoid69's full-sized avatar
🏠
Working from home

Rustam linuxoid69

🏠
Working from home
View GitHub Profile
@fl64
fl64 / main.go
Created December 24, 2020 07:18
golang prometheus exporter example
package main
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"log"
"math/rand"
"net/http"
"time"
@smola
smola / GLUSTER_SETUP.sh
Created October 18, 2018 09:24
Quick and dirty single-node GlusterFS setup
#
# Instructions for quick gluster server (1 node) setup with a volume on LVM.
# No replication, just using localhost.
#
# See https://docs.gluster.org/en/latest/Administrator%20Guide/Brick%20Naming%20Conventions/
#
# Install GlusterFS
add-apt-repository ppa:gluster/glusterfs-4.0
apt-get install glusterfs-server
@vsrc
vsrc / prepare-commit-msg
Last active March 2, 2020 13:45
Git pre commit hook for automatic adding branch name to commit message
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@varver
varver / cookie_jar_golang.go
Last active June 7, 2022 13:04
Login to a website with this golang code using persistent cookies or cookie jar .
@crashdump
crashdump / check-ssl-expire.py
Last active January 9, 2023 09:45
Report how many days before and http ssl certificate expire. I've also provided a template if you want to use it with Zabbix as an External Check: - Configure ExternalScripts variable in zabbix_server.conf - Put the script in the external script folder (I've used /etc/zabbix/externalscripts/) - Import the template & assign it to your host. - Wat…
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Adrien Pujol - http://www.crashdump.fr/"
__copyright__ = "Copyright 2013, Adrien Pujol"
__license__ = "Mozilla Public License"
__version__ = "0.3"
__email__ = "adrien.pujol@crashdump.fr"
__status__ = "Development"
__doc__ = "Check a TLS certificate validity."
@XenGi
XenGi / 99-displaymagic.rules
Last active September 18, 2021 02:11
display magic
#/etc/udev/rules.d/99-displaymagic.rules
# enable LVDS on HDMI disconnect
SUBSYSTEM=="drm", ACTION=="change", RUN+="/usr/local/bin/displaymagic.sh"
@felixhummel
felixhummel / info.php
Created September 7, 2012 18:26
fastcgi nginx php test
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index info.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
@fernandoaleman
fernandoaleman / how-to-create-an-rpm-repository.sh
Created November 18, 2011 17:57
How to create an RPM repository
# How to create an RPM repository
# This is for Redhat 64 bit versions of Linux. You can create your own RPM repository # to host your custom RPM packages.
#
# See "How to create an RPM from source with spec file" for more information.
# https://gist.github.com/1376973
# Step: 1
# Install createrepo
@bessarabov
bessarabov / gist:1002187
Created June 1, 2011 12:17
Игра: Программист и Заказчик (Нарисуйте мне девушку!)
Благодаря этому уникальному упражнению, вы, совершенно не зная ни одного языка программирования, сможете почувствовать себя настоящим программистом-профессионалом!
Для упражнения потребуются:
― два участника;
― часы (желательно с секундомером);
― листок чистой бумаги;
― ручка (шариковая или гелевая, но именно ручка,- это важно).
Один из участников будет "Заказчиком" (Работодателем), другой ― "Исполнителем" (Программистом).
"Заказчику" выдаются часы и право голоса, "Исполнителю" ― бумага и ручка.