Skip to content

Instantly share code, notes, and snippets.

View djeraseit's full-sized avatar
🎯
Focusing

Theodis Butler djeraseit

🎯
Focusing
View GitHub Profile
@jaywilliams
jaywilliams / convert.php
Last active April 13, 2023 04:23
# Convert a QuickBooks QBXML Report to HTML/CSV File # I created this little script to help me read through the raw XML responses from QuickBooks. I originally built it to export to a CSV file, but found that a simple HTML table was better suited for my usage. However, I've included the CSV code below for anyone who may need that functionality. …
<?php
/**
* Convert a QuickBooks QBXML Report to HTML/CSV File
*
* I created this little script to help me read through the raw XML responses
* from QuickBooks. I originally built it to export to a CSV file, but found
* that a simple HTML table was better suited for my usage. However, I've
* included the CSV code below for anyone who may need that functionality.
*
@robinsmidsrod
robinsmidsrod / gist:4419556
Last active December 10, 2015 10:08
Some Enterprise-grade HP servers seems to identify with the wrong UUID to iPXE.
#!perl
use strict;
use warnings;
use Test::More;
my $actual_uuid = '1F00B3E0-00C6-0800-2C4A-BCAEC5280EAD';
my $ipxe_uuid = 'e0b3001f-c600-0008-2c4a-bcaec5280ead';
mutate {
# Rename some fields into something more useful
type => "eventlog"
rename => [ "Message", "@message" ]
rename => [ "Severity", "eventlog_severity" ]
rename => [ "SeverityValue", "eventlog_severity_code" ]
rename => [ "FileName", "eventlog_channel" ]
rename => [ "SourceName", "eventlog_program" ]
rename => [ "SourceModuleName", "nxlog_input" ]
rename => [ "CategoryNumber", "eventlog_category" ]
@robinsmidsrod
robinsmidsrod / logstash.conf
Created December 5, 2012 13:01
Logging Windows event log information to Logstash using nxlog and JSON transport
input {
tcp {
type => "syslog"
host => "127.0.0.1"
port => 3514
}
tcp {
type => "eventlog"
host => "10.1.1.2"
port => 3515
@robinsmidsrod
robinsmidsrod / helenos.ipxe
Created October 21, 2012 21:57 — forked from vhotspur/helenos.ipxe
iPXE config fo HelenOS
#!ipxe
# Get the ISO from
# http://www.helenos.org/download
# and unpack the files in /boot/ to the directory
# where this file is placed
# (note that you have to enable more than 8 modules
# for multiboot)
kernel kernel.bin
@robinsmidsrod
robinsmidsrod / src.config.local.general.h
Created October 7, 2012 16:59
Compile with make bin/vendoridpciid--ath9k.rom EMBED=../wlanboot.ipxe
//#undef PXE_STACK /* PXE stack in iPXE - you want this! */
//#undef PXE_MENU /* PXE menu booting */
//#undef DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */
#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
#undef SANBOOT_PROTO_AOE /* AoE protocol */
#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
#undef SANBOOT_PROTO_FCP /* Fibre Channel protocol */
#undef CRYPTO_80211_WEP /* WEP encryption (deprecated and insecure!) */
#undef CRYPTO_80211_WPA /* WPA Personal, authenticating with passphrase */
//#undef CRYPTO_80211_WPA2 /* Add support for stronger WPA cryptography */
<?php
// STEP 1: read POST data
// Reading POSTed data directly from $_POST causes serialization issues with array data in the POST.
// Instead, read raw POST data from the input stream.
$raw_post_data = file_get_contents('php://input');
$raw_post_array = explode('&', $raw_post_data);
$myPost = array();
foreach ($raw_post_array as $keyval) {
@adamvr
adamvr / README.md
Created July 26, 2012 03:14
Openwrt scripts

Openwrt scripts

A couple of scripts for publishing the state of an openwrt router to mqtt.

Relies on mosquitto_pub and mosquitto_sub being present

init

Init.d scripts including one to start a pair of file monitors and one to publish whether or not the router is onlien

@johnkary
johnkary / WSSoapClient.php
Created June 27, 2012 20:08
WS-Security for PHP SoapClient
<?php
/**
* Copyright (c) 2007, Roger Veciana
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
@robinsmidsrod
robinsmidsrod / vmware-installer.ipxe
Created May 22, 2012 14:26
Booting the VMware installer manually using iPXE multiboot support
# Based on details from http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.upgrade.doc_50%2FGUID-2F0D4696-3681-4C13-9552-5280C6406376.html
set base-url http://XXX.XXX.XXX.XXX/
kernel ${base-url}tboot.b00
imgargs tboot.b00 ks=${base-url}ks.cfg
module ${base-url}b.b00
module ${base-url}useropts.gz
module ${base-url}k.b00
module ${base-url}a.b00
module ${base-url}s.v00
module ${base-url}weaselin.v00