Skip to content

Instantly share code, notes, and snippets.

View ryanmoon's full-sized avatar

Ryan Moon ryanmoon

View GitHub Profile
@ryanmoon
ryanmoon / pipeline_example.groovy
Created October 15, 2020 19:24
Pipeline Example where when using the Jenkins GitHub checks plugin, it stops communicating properly after multiple commits.
/* groovylint-disable DuplicateMapLiteral */
def call() {
pipeline {
triggers {
issueCommentTrigger('/redo_jenkins')
}
agent { label 'chef' }
environment {
CHEF_LICENSE = 'accept-silent'
DANGER_GITHUB_API_TOKEN = credentials('example')
@ryanmoon
ryanmoon / remove_chefdk.sh
Created December 11, 2018 20:25
Script to remove ChefDK on MacOS
#!/bin/bash
################
# REMOVE CHEFDK
################
# Removes the chefdk on MacOS
# Version 0.1.3
# 2018/12/11
# Ryan Moon
#################
@ryanmoon
ryanmoon / isohybrid.pl
Created September 12, 2018 19:58 — forked from jsarenik/isohybrid.pl
isohybrid.pl from Syslinux-6.03
#!/usr/bin/perl
## -----------------------------------------------------------------------
##
## Copyright 2002-2008 H. Peter Anvin - All Rights Reserved
## Copyright 2009 Intel Corporation; author: H. Peter Anvin
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
## Boston MA 02111-1307, USA; either version 2 of the License, or
@ryanmoon
ryanmoon / windows_version_check
Created July 9, 2018 19:34
[Find Windows Software] Using Powershell Find Version of Software Installed Replace VARIABLE with the name of the Software #powershell #version
Get-WMIObject -Class win32_product -Filter {Name like "%VARIABLE%"} | Select-Object -Property Name,Version | ft -hidetableheaders
@ryanmoon
ryanmoon / boxstarter.ps1
Last active February 2, 2022 20:37 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Original Author: Jess Frazelle <jess@linux.com>
# Forked from: https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# Modified by: Moon
# Last Updated: 2022-02-03
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
@ryanmoon
ryanmoon / s3.sh
Created October 28, 2017 04:29 — forked from chrismdp/s3.sh
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@ryanmoon
ryanmoon / creator_folder_creator.sh
Last active September 18, 2017 20:19
Script to create folders on a StorNext or XSAN Volume using Open Directory
#!/bin/bash
#########################################
# Creator Folder Creator
# Ryan Moon
#########################################
# This script, which is called by the
# use_granter script, will create a
# folder on the SAN for creators. Using values
# provided by use_granter
# Requires:
@ryanmoon
ryanmoon / Rakefile
Created August 17, 2017 18:58
Rakefile for Chef Cookbooks
# YTS Cookbook Rakefile
# 08/17/2017
# Cobbled together by Ryan Moon
###########
# REQUIRES
###########
require 'rspec/core/rake_task'
require 'cookstyle'
@ryanmoon
ryanmoon / pre-commit
Last active August 17, 2017 18:53
Example of a pre-commit for munki
#!/bin/bash
find . -name '*.DS_Store' -type f -delete
/usr/bin/plutil manifests/*
/usr/bin/plutil pkgsinfo/*/*.plist
/usr/bin/plutil pkgsinfo/*/*/*.plist
@ryanmoon
ryanmoon / pre-commit
Last active August 17, 2017 18:43
Git Hook for Chef Cookbooks
#!/bin/bash
find . -name '*.DS_Store' -type f -delete
chef exec rake style