Skip to content

Instantly share code, notes, and snippets.

@carceneaux
carceneaux / windows-setup.ps1
Last active September 3, 2022 03:05
Sample one-time startup script to perform base Windows configuration.
# Ensuring FW is disabled
Set-NetFirewallProfile -All -Enabled False
# Installing OpenSSH
Add-WindowsCapability -Online -Name 'OpenSSH.Server~~~~0.0.1.0'
Get-Service sshd | Set-Service -StartupType Automatic
Start-Service sshd
# Setting default SSH shell
while (-not (Get-Item -Path 'HKLM:\SOFTWARE\OpenSSH')){Start-Sleep -Seconds 5}
@carceneaux
carceneaux / inventory.py
Last active September 1, 2022 19:34 — forked from tboerger/inventory.py
Dynamic inventory for Ansible on VMWare vCloud director
#!/usr/bin/env python3
import json
import requests
import os
import argparse
import xml.etree.cElementTree as ET
from time import time
GLOBALS = {
@carceneaux
carceneaux / remove_gitlab_artifacts.sh
Last active July 17, 2024 09:39
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: carcenea@gmail.com
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#
@carceneaux
carceneaux / cf-veeam-parameter-retrieval.yaml
Created March 21, 2019 15:07
CloudFormation Template - API Gateway acting as Lambda Proxy with Custom Authorizer and CORS enabled.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS CloudFormation deployment for Veeam Parameter Retrieval solution.
Resources:
# API Gateway Configuration
ApiGateway:
Type: AWS::ApiGateway::RestApi
Properties:
Name: !Sub ${AWS::StackName}-API
@carceneaux
carceneaux / brew-dnsmasq.md
Created August 2, 2018 14:56 — forked from davebarnwell/brew-dnsmasq.md
install dnsmasq with brew

Install dnsmasq and configure for *.dev.local domains

$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf

Reload configuration and clear cache

# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/

$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist