Skip to content

Instantly share code, notes, and snippets.

@dnaeon
dnaeon / zabbix-vpoller-template.xml
Created April 5, 2014 15:40
zabbix-vpoller-template
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2014-04-05T12:23:02Z</date>
<groups>
<group>
<name>Hypervisors</name>
</group>
<group>
<name>Templates</name>
@dnaeon
dnaeon / zabbix-vpoller-templates.xml
Created April 6, 2014 14:47
zabbix-vpoller-templates
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2014-04-06T15:40:46Z</date>
<groups>
<group>
<name>Datastores</name>
</group>
<group>
<name>Hypervisors</name>
@dnaeon
dnaeon / zabbix-vpoller-template-07.04.2014.xml
Created April 7, 2014 17:05
zabbix-vpoller-template-07.04.2014
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2014-04-07T17:57:57Z</date>
<groups>
<group>
<name>Datastores</name>
</group>
<group>
<name>Hypervisors</name>
@dnaeon
dnaeon / vpoller-issue-128.patch
Created May 12, 2015 06:51
vpoller-issue-128
diff --git a/extra/zabbix/vsphere-import/zabbix-vsphere-import b/extra/zabbix/vsphere-import/zabbix-vsphere-import
index 01cd0c4..8f797a8 100755
--- a/extra/zabbix/vsphere-import/zabbix-vsphere-import
+++ b/extra/zabbix/vsphere-import/zabbix-vsphere-import
@@ -436,8 +436,14 @@ class ZabbixVSphere(object):
host
)
+ # Fix for issue #128
+ # Split the VM name which consists of '<vm> (uuid)'
diff --git a/extra/zabbix/vsphere-import/zabbix-vsphere-import b/extra/zabbix/vsphere-import/zabbix-vsphere-import
index 01cd0c4..3958e6a 100755
--- a/extra/zabbix/vsphere-import/zabbix-vsphere-import
+++ b/extra/zabbix/vsphere-import/zabbix-vsphere-import
@@ -436,8 +436,14 @@ class ZabbixVSphere(object):
host
)
+ # Fix for issue #128
+ # Split the VM name which consists of '<vm> (uuid)'
/* Example C header file for libtest */
...
#define LIB_VERSION 1
...
/* End of header file */
// Example Rust code
extern crate libc;
@dnaeon
dnaeon / rust-libzmq-helloworld.rs
Created June 30, 2015 09:49
rust-libzmq-helloworld
extern crate libc;
extern crate libzmq;
use std::ffi;
use std::thread;
@dnaeon
dnaeon / test-rust-lib.rs
Last active August 29, 2015 14:24
test-rust-lib
extern crate libc;
use std::{boxed, ffi, ptr};
use libc::c_char;
@dnaeon
dnaeon / test-c-program-calling-rust.c
Created July 7, 2015 07:35
test-c-program-calling-rust
#include <stdio.h>
typedef struct
{
const char *key;
@dnaeon
dnaeon / range.scm
Created January 25, 2018 12:48
Scheme - range function
;;; validate-step validates whether a given step is a valid one.
(define validate-step
(lambda (step)
(let ((s
(cond
((and (list? step) (not (null? step))) (car step))
((and (list? step) (null? step)) 1)
((string? step) (string->number step))
((integer? step) step))))