Skip to content

Instantly share code, notes, and snippets.

View zhum's full-sized avatar

Zhumatiy Sergey zhum

View GitHub Profile
@sit
sit / gitproxy-socat
Created January 20, 2009 02:30
A simple wrapper around socat to use as a git proxy command
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
@agarzon
agarzon / dnsbl.sh
Last active October 2, 2022 09:04
DNS Black List - Linux shell script (improved from: http://www.daemonforums.org/showthread.php?t=302)
#!/bin/sh
# Check if an IP address is listed on one of the following blacklists
# The format is chosen to make it easy to add or delete
# The shell will strip multiple whitespace
BLISTS="
b.barracudacentral.org
bb.barracudacentral.org
bl.deadbeef.com
bl.mailspike.net
@srikanthjeeva
srikanthjeeva / https GET request with Basic Auth in Ruby
Created January 28, 2015 20:33
https GET request with Basic Auth in Ruby
require 'net/http'
require 'net/https'
require 'uri'
uri = URI('https://example.com/rest/api/2/1')
Net::HTTP.start(uri.host, uri.port,
:use_ssl => uri.scheme == 'https',
:verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
@protrolium
protrolium / ffmpeg.md
Last active November 12, 2024 21:27
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@kakra
kakra / 20-natural-scrolling.conf
Created April 21, 2017 17:00
xorg.conf.d/20-natural-scrolling.conf
Section "InputClass"
Identifier "Enable natural scrolling by default"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchDriver "libinput"
Option "NaturalScrolling" "on"
EndSection
@drewler
drewler / epd_ipd.c
Created November 10, 2017 18:34
Arduino - IPAddress to char* + e-paper print
char IP[] = "xxx.xxx.xxx.xxx"; // buffer
IPAddress ip = WiFi.localIP();
ip.toString().toCharArray(IP, 16);
paint.DrawStringAt(0, 0, IP, &Font12, COLORED);
epd.SetPartialWindowBlack(paint.GetImage(), 0, 20, paint.GetWidth(), paint.GetHeight());
epd.DisplayFrame();

Summary

Опиши в 3-4 предложениях что происходило и почему. Это информативное представление о факапе с высоты птичьего полета, оно должно быть понятно любому человеку без контекста.

Ущерб

Качественная оценка Какая функциональность не работала, насколько долго, у кого. Была ли потеря или порча данных. Выбери поле справа.

Количественная оценка

user www-data;
worker_processes auto;
pid /run/nginx/nginx.pid; # only line changed from default
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}