Skip to content

Instantly share code, notes, and snippets.

View mmarseglia's full-sized avatar
:octocat:
Around

Mike Marseglia mmarseglia

:octocat:
Around
View GitHub Profile
@mmarseglia
mmarseglia / yum-info.txt
Created February 13, 2019 14:38
open-vm-tools
yum info --verbose open-vm-tools.x86_64
Loading "fastestmirror" plugin
Config time: 0.008
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
Loading mirror speeds from cached hostfile
* base: mirror.net.cen.ct.gov
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: mirrors.tripadvisor.com
@mmarseglia
mmarseglia / Makefile
Created September 12, 2018 15:29
Terraform Makefile
APP_NAME = ${TF_VAR_app_name}
REGION = ${TF_VAR_region}
KEY = 'terraform.state'
PROFILE = ${TF_VAR_profile}
AWS_ACCOUNT = ${TF_VAR_aws_account}
BUCKET = "${APP_NAME}-${AWS_ACCOUNT}"
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
.PHONY: help
help: ## This help message.
@mmarseglia
mmarseglia / cmtool.sh
Last active June 19, 2017 12:42
Packer, puppet with control repo image creation
#!/bin/sh
set +e
# This script needs a couple files work properly.
# use packer file provisioner to copy ssh key for git here, puppet will make sure permissions are right
# /tmp/id_rsa
#
# ditto, copy hiera config here
# /tmp/hiera.yaml
#
@mmarseglia
mmarseglia / SmbServer.ps1
Last active September 1, 2016 21:26
powershell desired state configuration deploy modules for download and do a push to remote node
# How to get a remote host to pull modules when pushing a Desired State Configuration
# Package up required PowerShell modules
# Place them in the required directory on the pull server
# Execute DSC in 'push' mode
# Remote host will pull modules from configured DSC repository
#
# todo: DRY. Can we use the array $modules when invoking the Import-DscResource cmdlet?
#
Configuration SmbServer
{
@mmarseglia
mmarseglia / .bash_profile
Last active April 26, 2016 17:24 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
#!/bin/sh
find . -name "*.pp" -type f -exec puppet parser validate {} --debug \;
@mmarseglia
mmarseglia / bluetooth_mouse_fix.sh
Created March 3, 2016 19:28
Fix bluetooth mouse when it won't connect to mac after coming out of sleep.
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport; sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
# Class: mod_jk
#
# Install and configure mod_jk with java
#
# Parameters
#
# [*$source_path*]
# The is the directory from where the mod_jk module will get its setup files and configurations
#
# [*$mod_jk_version*]
@mmarseglia
mmarseglia / pre-commit.puppet
Created October 31, 2014 13:34
git pre-commit hook for puppet development
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD