Skip to content

Instantly share code, notes, and snippets.

Living life one byte at a time

Greg Bray gbrayut

Living life one byte at a time
Block or report user

Report or block gbrayut

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gbrayut / hbase-site.xml
Last active Aug 26, 2015
HBase setup scripts using Cloudera CDH 5.4.4 on RHEL 6.x
View hbase-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
View Improved_Hanselman_Sample_1.cs
using System;
namespace WindowsGame1
#if WINDOWS || XBOX || WP7 || ZUNE
static class Program
/// <summary>
/// The main entry point for the application.
/// </summary>
gbrayut / Blogger_Mobile_Redirect.js
Created Dec 20, 2010
Script used to redirect mobile browsers to Blogger Mobile Template view
View Blogger_Mobile_Redirect.js
<script type='text/javascript'>
//<![CDATA[ Wrap in CDATA to prevent issues with < and & characters in Blogger xml template
//Function to replace or add a parameter to current URL. From:
function insertParam(key, value) {
key = escape(key); value = escape(value);
var kvp ='&');
var i = kvp.length; var x; while (i--) {
x = kvp[i].split('=');
View batch.cmd
powershell -file c:\temp\script.ps1 -test:%1
View test.cs
void Main()
var username = @"ad\u0861240";
var userNameNoDomain = username.Split('\\').Last();
var Context = new System.DirectoryServices.AccountManagement.PrincipalContext( System.DirectoryServices.AccountManagement.ContextType.Domain
var directoryEntry = new DirectoryEntry("LDAP://DC=ad,DC=utah,DC=edu");
var directoryEntryBase = new DirectoryEntry("LDAP://DC=ad,DC=utah,DC=edu");
using (var directorySearcher = new DirectorySearcher(directoryEntry)
gbrayut / cinst tomboy.log
Created Nov 26, 2013
Issue installing tomboy 1.14.0
View cinst tomboy.log
Chocolatey (v0.9.8.23) is installing 'tomboy' and dependencies. By installing you accept the license for 'tomboy' and ea
ch dependency you are installing.
______ gtksharp v2.12.20.1 ______
Downloading gtksharp 32 bit ( to C:\Users\a4hdszz\AppData\Lo
Installing gtksharp...
Elevating Permissions and running msiexec /i "C:\Users\a4hdszz\AppData\Local\Temp\chocolatey\gtksharp\gtksharpInstall.MS
I" /quiet . This may take awhile, depending on the statements.
gtksharp has been installed.
gtksharp has finished successfully! The chocolatey gods have answered your request!
gbrayut / Output
Created Jan 12, 2016
Testing TagOverride
View Output
2016/01/12 16:12:26 fatal: main.go:266: Type mismatch for 'conf.Conf.Tags': Expected map but found '[]map[string]interface {}'.
gbrayut / Systemd.service
Created Dec 8, 2015
Bosun Service files
View Systemd.service
#Bosun unit file at /etc/systemd/system/bosun.service
Description=Bosun Service
gbrayut / hieradata_example.json
Last active Oct 10, 2016
Scollector Puppet Files
View hieradata_example.json
"scollector::collector_tags": [
gbrayut /
Last active Jan 6, 2017
Python testing WMI
#pip install comtypes wmi
import sys, os, traceback
sys.coinit_flags = 0 # sets pythoncom.COINIT_MULTITHREADED = 0
import comtypes.client #
from comtypes.automation import IDispatch, IEnumVARIANT
import wmi
#Use help(...) and dir(...) on any object/class to see more details
#These are already set on the main thread by sys package, but need to call if we use other threads
You can’t perform that action at this time.