Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Around

Mike Marseglia mmarseglia

:octocat:
Around
View GitHub Profile
View yum-info.txt
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 Sep 12, 2018
Terraform Makefile
View 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 Jun 19, 2017
Packer, puppet with control repo image creation
View cmtool.sh
#!/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 Sep 1, 2016
powershell desired state configuration deploy modules for download and do a push to remote node
View SmbServer.ps1
# 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 Apr 26, 2016 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .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
View puppet_parser_example.sh
#!/bin/sh
find . -name "*.pp" -type f -exec puppet parser validate {} --debug \;
@mmarseglia
mmarseglia / bluetooth_mouse_fix.sh
Created Mar 3, 2016
Fix bluetooth mouse when it won't connect to mac after coming out of sleep.
View bluetooth_mouse_fix.sh
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport; sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
View gist:e0a48b812085db578986
# 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 Oct 31, 2014
git pre-commit hook for puppet development
View pre-commit.puppet
# 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