Skip to content

Instantly share code, notes, and snippets.


Denis Zhdanov deniszh

View GitHub Profile
deniszh / salt-2016.11-security.patch
Last active May 6, 2020
Fixes for CVE-2020-11651 and CVE-2020-11652 for Salt 2016.11 branch
View salt-2016.11-security.patch
# use instead
deniszh / salt-2015.5-security.patch
Last active May 6, 2020
Fixes for CVE-2020-11651 and CVE-2020-11652 for Salt 2015.5 branch
View salt-2015.5-security.patch
# use instead
deniszh / salt-2019.2-security.patch
Last active May 6, 2020
Fixes for CVE-2020-11651 and CVE-2020-11652 for Salt 2019.2 branch
View salt-2019.2-security.patch
# use instead
deniszh / CVE-2020-11651-11652.sls
Created Apr 30, 2020
How to patch Salt by salt
View CVE-2020-11651-11652.sls
{% if grains.saltversion == "2016.11.6" %}
# Just in case there is no patch command installed
# We use directory name here (saltpath) to apply patches that touch multiple files
- name: '{{ grains.saltpath }}'
View oom_killer_stat.mtail
counter processes_oom_killed_total
counter processes_oom_killed_by_name by label
/Killed process (\d+) \((\S+)\) total-vm:\d+kB, anon-rss:\d+kB, file-rss:\d+kB$/ {
deniszh / set_nofile_limit.c
Created Nov 13, 2018 — forked from carlhoerberg/set_nofile_limit.c
Set nofile limit for a running process
View set_nofile_limit.c
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \
} while (0)
deniszh /
Last active Jun 5, 2018
Quick and dirty script to migrate Graphite from whisper to cyanite
#!/usr/bin/env python
import os
import mmap
import struct
import signal
import optparse
import cql
deniszh /
Last active Sep 21, 2017
Graphouse finder for graphite-api
import json
import time
import traceback
import urllib.parse
import requests
from structlog import get_logger
from graphite_api.intervals import IntervalSet, Interval
from graphite_api.node import LeafNode, BranchNode
deniszh / graphite_0.9.15_epel_fnv1a.patch
Created Oct 19, 2016
Patch for FNV1A_CH support in graphite-web 0.9.15
View graphite_0.9.15_epel_fnv1a.patch
diff -u -r graphite_old/render/ graphite/render/
--- graphite_old/render/ 2016-10-19 18:22:37.000000000 +0200
+++ graphite/render/ 2016-10-19 18:12:00.000000000 +0200
@@ -106,7 +106,7 @@
self.hosts = [ (server, instance) for (server, port, instance) in hosts ]
self.ports = dict( ((server, instance), port) for (server, port, instance) in hosts )
self.timeout = float(timeout)
- self.hash_ring = ConsistentHashRing(self.hosts)
+ self.hash_ring = ConsistentHashRing(self.hosts, hash_type=settings.CARBONLINK_HASHING_TYPE)
self.connections = {}
import os
import sys
from importlib import import_module
except ImportError:
from django.utils.importlib import import_module
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings') # noqa