Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrii Miroshnychenko zentavr

  • Zaporizhzhia, Ukraine
View GitHub Profile
View dropJenkinsSlaves.groovy
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 Jul 25, 2018
Proxmox 5.2 Subscription banner remove
View proxmoxlib.js.diff
--- /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 Jul 5, 2018
Cuckoo Helpers for Building OS X Images
View clone_medium.sh
#!/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 Feb 20, 2019
Prune && Truncate unused File Media Volumes in Bacula
View update_all_pools.sh
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 Aug 16, 2019
Syntax files for Midnight Commander editor
View Syntax
# 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 Jul 14, 2016 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

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 Dec 14, 2015
Files for ansible issue #13549
View defaults---main.yml
# 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