Skip to content

Instantly share code, notes, and snippets.

View bdwyertech's full-sized avatar
☁️

Brian Dwyer bdwyertech

☁️
View GitHub Profile
@bdwyertech
bdwyertech / Set-SSLCert_Chef_Vagrant.ps1
Last active August 29, 2015 14:01
Set SSL_CERT_FILE for Vagrant
# Filename: Set-SSLCert_Chef_Vagrant.ps1
# Brian Dwyer - 5/22/14
# ***USAGE***
# To Setup the SSL_CERT_FILE Variable
# ./Set-SSLCert_Chef_Vagrant.ps1 set
# To Remove the SSL_CERT_FILE Variable
# ./Set-SSLCert_Chef_Vagrant.ps1 unset
@bdwyertech
bdwyertech / Set-ChefDK_Enviro_Vars.ps1
Last active September 11, 2018 02:37
Setter for ChefDK Environmental Variables
# Filename: Set-ChefDK_Enviro_Vars.ps1
# Brian Dwyer - Intelligent Digital Services - 11/5/14
# ***USAGE***
# To Setup the ChefDK Ruby Variables
# ./Set-ChefDK_Enviro_Vars.ps1 set
# To Remove the ChefDK Ruby Variables
# ./Set-ChefDK_Enviro_Vars.ps1 unset
@bdwyertech
bdwyertech / kali_vmware_tools_install.sh
Created March 28, 2015 19:23
Kali Linux VMware Tools Installation Script
#!/bin/bash
# Kali VMware Tools Installation Script
# Brian Dwyer - Intelligent Digital Services - 03/28/15
# Check for VMware Tools Tarball
if [[ ! $(ls /media/cdrom/VMwareTools*.tar.gz 2>/dev/null) ]] ; then
echo 'Cannot find VMware Tools... Click Install VMware Tools in the GUI before running this!'
exit 1
fi
@bdwyertech
bdwyertech / Globally_Set_ELB_SSL_Policy.ps1
Created April 9, 2015 22:22
Globally Set AWS ELB SSL Policy
# AWS Global ELB SSL Policy
# Brian Dwyer - Intelligent Digital Services - 4/5/15
# Variables
$PolicyName="SSL-POLICY--$(Get-Date -Format yy-MM-ddTHHmmss)"
$ELBReferencePolicy='ELBSecurityPolicy-2015-03'
# Dependencies
Import-Module AWSPowerShell
@bdwyertech
bdwyertech / ix4-300d-HighCPUFix.sh
Created August 12, 2015 02:21
Lenovo IX4-300D High CPU Usage Fix
#!/bin/bash
# Lenovo IX4-300D High CPU Usage Fix
# Brian Dwyer - 8/11/15
# Make a directory to mount the boot image
mkdir /tmp/mount
# Mount the boot image
mount -o loop /boot/images/apps /tmp/mount
@bdwyertech
bdwyertech / vbox_uninstall.tool
Created September 9, 2015 17:42
Virtualbox Uninstaller
#!/bin/bash
# $Id: VirtualBox_Uninstall.tool 89624 2013-10-07 16:13:23Z bird $
## @file
# VirtualBox Uninstaller Script.
#
#
# Copyright (C) 2007-2013 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
@bdwyertech
bdwyertech / do_query_metadata.rb
Created October 30, 2015 22:12
DigitalOcean Metadata Query - Ruby
# DigitalOcean Metadata Chef Library
# rubocop:disable LineLength
require 'net/http'
# Public: This defines a module to retrieve Metadata from DigitalOcean
module DoMetadata
DO_METADATA_ADDR = '169.254.169.254' unless defined?(DO_METADATA_ADDR)
DO_SUPPORTED_VERSIONS = %w( v1 )
DO_DEFAULT_API_VERSION = 'v1'
@bdwyertech
bdwyertech / knife cheat
Created November 16, 2015 21:08 — forked from ipedrazas/knife cheat
Hello!
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
@bdwyertech
bdwyertech / nested.conf
Created December 10, 2015 22:46
Nginx - Nested locations and PHP-FPM
# => YOURLS URL Shortener Configuration
location /u/ {
root /var/www/api/urls/;
rewrite ^/(.*)/$ /$1/index.php last; # Enables index functionality (only really used for /u/admin/)
rewrite ^/u/(.*)$ /$1 break; # Strips /u/ from the URI for static files
try_files $uri /u/yourls-loader.php$is_args$args;
# => API PHP-FPM
location ~ \.php$ {
fastcgi_split_path_info ^/u(.+?\.php)(.*)$;
@bdwyertech
bdwyertech / bdwyertech-vmwaretools.te
Last active January 4, 2016 00:58
VMware Tools SELinux Policy
module bdwyertech-vmwaretools 1.0;
require {
type unconfined_t;
type lib_t;
type unconfined_service_t;
class process transition;
class file entrypoint;
}