Skip to content

Instantly share code, notes, and snippets.

View azilber's full-sized avatar
😴
ZZZZZzzzzzzz.......

Alexey Zilber azilber

😴
ZZZZZzzzzzzz.......
View GitHub Profile
@P-A-R-U-S
P-A-R-U-S / Golang-CIDR-to-IP
Created March 16, 2018 22:55
Go: Convert CIDR to IP
// Convert CIDR to IPv4 range
func CIDRRangeToIPv4Range(cidrs []string) (ipStart string, ipEnd string, err error) {
var ip uint32 // ip address
var ipS uint32 // Start IP address range
var ipE uint32 // End IP address range
for _, CIDR := range cidrs {
@maxivak
maxivak / readme.md
Last active September 5, 2022 18:43
Provisioning Docker containers with Chef

Provisioning Docker container with Chef

Chef provisioning

  • Chef provisioning is a framework that allows clusters to be managed by the chef-client and the Chef server in the same way nodes are managed: with recipes.

  • Chef provisioning is a collection of resources that enable the creation of machines and machine infrastructures using the chef-client.

@nawawi
nawawi / icu-last-intltest-failed
Created September 18, 2014 03:08
icu-last intltest failed patch
--- icu.orig/source/test/intltest/dtfmttst.cpp 2013-10-04 22:48:00.000000000 +0200
+++ icu/source/test/intltest/dtfmttst.cpp 2014-06-13 19:34:40.611299572 +0200
@@ -1129,7 +1129,7 @@
return;
}
parse2DigitYear(fmt, "5/6/17", date(117, UCAL_JUNE, 5));
- parse2DigitYear(fmt, "4/6/34", date(34, UCAL_JUNE, 4));
+ parse2DigitYear(fmt, "4/6/34", date(134, UCAL_JUNE, 4));
}
@jsianes
jsianes / ipassign
Last active May 27, 2024 07:51
Script to assign Public IP from Elastic IP pool for instances hosted in AWS. 'ec2-utils' and AWS CLI packages required. Instance role or access keys need to allow at least next EC2 actions: describe-addresses, associate-address and disassociate-address. Shell script is designed to be integrated with instance start-up
#!/bin/bash
# chkconfig: 2345 99 10
# description: Set Public IP from ElasticIP pool during instance startup
# processname: ipassign
# Provides: ipassign
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Set Public IP from ElasticIP pool during instance startup
@denji
denji / http-benchmark.md
Last active July 18, 2024 09:01
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@sawanoboly
sawanoboly / fluentd-source-haproxy.conf
Created July 13, 2012 01:10
syslog-ng setting for haproxy. Divide logs between accesslog and systeminfo.
<source>
type tail
format /(?<c_ip>[\w\.]+):(?<c_port>\d+) \[(?<a_date>.+)\] (?<f_end>[\w-]+) (?<b_end>[\w-]+)\/(?<b_server>[\w-]+) (?<tw>\d+)\/(?<tc>\d
+)\/(?<tt>\d+) (?<bytes>\d+) (?<t_state>[\w-]+) (?<actconn>\d+)\/(?<feconn>\d+)\/(?<beconn>\d+)\/(?<srv_conn>\d+)\/(?<retries>\d+) (?<
srv_queue>\d+)\/(?<backend_queue>\d+)/
time_format %d/%B/%Y:%H:%M:%S
path /var/log/haproxy/haproxy_access.log
pos_file /opt/fluentd/var/pos/haproxy_access.pos
tag haproxy.access
</source>