Skip to content

Instantly share code, notes, and snippets.

View adarobin's full-sized avatar

Adam Robinson adarobin

View GitHub Profile
@adarobin
adarobin / boot.txt
Created May 8, 2018 02:18
Install Oracle VM on Hyper-V
mboot.c32 xen.gz dom0_mem=max:128G dom0_max_vcpus=20 --- vmlinuz ata_piix.prefer_ms_hyperv=0 --- initrd.img
@adarobin
adarobin / unix_utils-c.patch
Created May 5, 2018 00:30
unix_utils-c.patch
diff --git a/common/mlutils/unix_utils-c.c b/common/mlutils/unix_utils-c.c
index 1b5eb7957..6d8aa0b6c 100644
--- a/common/mlutils/unix_utils-c.c
+++ b/common/mlutils/unix_utils-c.c
@@ -55,6 +55,10 @@
#include <windows.h>
#endif
+#ifdef __APPLE__ && __MACH__
+#include <sys/mount.h>
@adarobin
adarobin / yara-rpc-types.patch
Last active May 4, 2018 23:15
yara-rpc-types.patch
diff --git a/lib/yara.c b/lib/yara.c
index edced3be8..27390d153 100644
--- a/lib/yara.c
+++ b/lib/yara.c
@@ -25,8 +25,8 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
-#include <rpc/xdr.h>
#include <rpc/types.h>
@adarobin
adarobin / tsk-rpc-types.patch
Last active May 4, 2018 23:16
tsk-rpc-types.patch
diff --git a/lib/tsk.c b/lib/tsk.c
index 09e514bd2..cb1dc94ec 100644
--- a/lib/tsk.c
+++ b/lib/tsk.c
@@ -25,8 +25,8 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
-#include <rpc/xdr.h>
#include <rpc/types.h>
@adarobin
adarobin / guestfs-libraries.patch
Last active May 4, 2018 20:58
libguestfs configure patch for macos
diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
index 17cf556d9..b78a5cefa 100644
--- a/m4/guestfs-libraries.m4
+++ b/m4/guestfs-libraries.m4
@@ -181,9 +181,14 @@ PKG_CHECK_MODULES([RPC], [libtirpc], [], [
# If we don't have libtirpc, then we must have <rpc/xdr.h> and
# some library to link to in libdir.
RPC_CFLAGS=""
+ AC_CHECK_HEADER([rpc/types.h], [AC_DEFINE([HAVE_RPC_TYPES_H],
+ [], [no rpc/types.h])])
@adarobin
adarobin / packer.py
Last active September 27, 2019 10:47
Packer Ansible Connection Type Plugin for Ansible 2.6.x and 2.7.x
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.connection.ssh import Connection as SSHConnection
DOCUMENTATION = '''
connection: packer
short_description: ssh based connections for powershell via packer
description:
- This connection plugin allows ansible to communicate to the target packer machines via ssh based connections for powershell.