Skip to content

Instantly share code, notes, and snippets.

View zentavr's full-sized avatar

Andrii Miroshnychenko zentavr

  • Zaporizhzhia, Ukraine
View GitHub Profile
@zentavr
zentavr / Readme.md
Last active January 6, 2024 18:54
Proxmox Tunings

Cannot hotplug too much RAM

The problem is described here. The quick fix:

echo "options vhost max_mem_regions=512" > /etc/modprobe.d/vhost.conf
rmmod vhost_net
rmmod vhost
modprobe vhost_net
@zentavr
zentavr / Readme.md
Created November 17, 2021 23:18
Run K8S dashboard over Ingress

We have nginx ingress at our cluster:

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update ingress-nginx

helm upgrade --install \
  --namespace ingress-nginx \ 
  --create-namespace ingress-nginx \
  ingress-nginx/ingress-nginx \
  --set controller.service.type="NodePort" \
@zentavr
zentavr / dropJenkinsSlaves.groovy
Created February 13, 2019 00:25
Drop Jenkins Slaves
for (aSlave in hudson.model.Hudson.instance.slaves) {
println('====================');
println('Name: ' + aSlave.name);
println('getLabelString: ' + aSlave.getLabelString());
println('getNumExectutors: ' + aSlave.getNumExecutors());
println('getRemoteFS: ' + aSlave.getRemoteFS());
println('getMode: ' + aSlave.getMode());
println('getRootPath: ' + aSlave.getRootPath());
println('getComputer: ' + aSlave.getComputer());
println('\tcomputer.isAcceptingTasks: ' + aSlave.getComputer().isAcceptingTasks());
@zentavr
zentavr / proxmoxlib.js.diff
Created July 25, 2018 20:58
Proxmox 5.2 Subscription banner remove
--- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.bak 2018-05-14 12:06:33.000000000 +0300
+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 2018-07-25 23:55:45.513350604 +0300
@@ -350,6 +350,8 @@ Ext.define('Proxmox.Utils', { utilities:
var data = response.result.data;
if (data.status !== 'Active') {
+
+ /*************************************************
Ext.Msg.show({
title: gettext('No valid subscription'),
@zentavr
zentavr / clone_medium.sh
Created July 5, 2018 14:57
Cuckoo Helpers for Building OS X Images
#!/bin/bash
function usage() {
cat << EOF
usage: $0 options
The script creates MacOS X Guest VM.
OPTIONS:
-h, --help
@zentavr
zentavr / update_all_pools.sh
Last active February 20, 2019 20:42
Prune && Truncate unused File Media Volumes in Bacula
Hints:
* https://rem.co/blog/2015/01/15/bacula-purging-and-deleting-old-volumes/index.html
# List Volumes
list volumes
list volumes pool="File Pool one for percona-3.ti.local"
# Update pool
update pool="MySQL Pool for percona-1.ti.local"
@zentavr
zentavr / Syntax
Last active August 16, 2019 07:16
Syntax files for Midnight Commander editor
# Add to your Syntax file *BEFORE*:
file .\* unknown
include unknown.syntax
# The next lines:
file bgpd\.conf$ BGP\sSyntax
include bgp.syntax
@zentavr
zentavr / pr.md
Created July 14, 2016 22:46 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@zentavr
zentavr / defaults---main.yml
Created December 14, 2015 23:24
Files for ansible issue #13549
# Defaults for memcache setup defined here
---
memcached_port: 11211
memcached_listed_address: 0.0.0.0
memcached_max_conn: 2096
memcached_default_cache_size: 64
memcached_fs_file_max: 756024
memcached_logfile: /var/log/memcached.log
memcached_memory_chunks_multiplier: 1.25
memcached_memory_chunk_size: 48