Skip to content

Instantly share code, notes, and snippets.

View ryanmoon's full-sized avatar

Ryan Moon ryanmoon

View GitHub Profile
@ryanmoon
ryanmoon / Automount_Fixer.sh
Created February 22, 2017 01:04
Fix for Xsan Automounting Issues
#!/bin/bash
####################
# Automount Fixer
####################
# Install outset
# Place this script with an .sh in /usr/local/outset/boot-every
# Automount problems solved-ish
# Ryan Moon
# Diskutil value should be set to your ideal value from the output of diskutil list | wc -l
# San_name should be set to the name of your SAN
@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 / 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 / OSX: keychain_menu_bar_via_terminal
Last active October 8, 2018 23:10
OS X: Keychain Menu Bar via Terminal
defaults write com.apple.systemuiserver menuExtras -array-add '/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu'; killall SystemUIServer
@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 / MacOS Power Settings
Created July 21, 2016 00:22
MacOS Power Settings for use with Outset at boot-every
#!/bin/bash
###
# Outset script for commands to run at boot-every and set power settings
###
pmset repeat wakeorpoweron MTWRFSU 7:00:00
pmset -a displaysleep <%= @displaysleep %> halfdim 1
pmset -a disksleep 0
pmset -a sleep 0
@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 / GistList!.md
Created February 10, 2015 20:23
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

@ryanmoon
ryanmoon / fourth-octet-ip
Created April 28, 2015 21:41
Print Fourth Octet of IP Address (OS X)
ipconfig getifaddr en0 | tr "." " " | awk '{print $4}'