Skip to content

Instantly share code, notes, and snippets.

View ryanmoon's full-sized avatar

Ryan Moon ryanmoon

View GitHub Profile
@ryanmoon
ryanmoon / curl convert display
Last active December 2, 2015 23:37
Curl from DeployStudio, then convert binary to xml plist , then open in Sublime Text
curl -u deploystudioadmin -k http://dsbox:60080/computers/get/all > dscomputers.plist; \
plutil -convert xml1 dscomputers.plist; \
subl dscomputers.plist
/usr/libexec/PlistBuddy -c "Set :computers:00\:00\:00\:AA\:AA\:AA:cn diane" out.plist
@ryanmoon
ryanmoon / ip_walrus.sh
Last active November 18, 2017 22:32
OS X Command Line Network Interface Assistant. I often need to modify my network settings, I find this to be the quickest way.
#!/bin/bash
#########################################
set -euo pipefail
IFS=$'\n\t'
#########################################
# IP Walrus
# (OS X Command Line Network Interface Assistant)
# Ryan Moon ryanmoon@users.noreply.github.com
# Created on 10/29/2013
# Version 3.0.0 on 07/27/2015
@ryanmoon
ryanmoon / jenikns_ci_on_osx.md
Last active August 29, 2015 14:27 — forked from ostinelli/jenkins_ci_on_osx.md
Setup Jenkins CI on OSX.

Jenkins CI on OSX

Instructions on how to setup Jenkins CI on a Mac for use with test-kitchen. Since I need to test against OS X Images, I'm using Vagrant, the Vagrant VMWare Plugin and VMWare Fusion.

Still a work in progress...

Download & Install dependencies

All of these operations are done with the admin user.

Developer tools

@ryanmoon
ryanmoon / benderplus
Created September 28, 2015 20:25 — forked from anotherspot/benderplus
A modified script for robot clouds bender to include Mavericks Server backups of Service Databases
#!/bin/bash
# Bender
# Written by Chad Nielsen
# Forget Computers, Get Creative!
# Version History
# 1.0 - Initial creation of script for use with a companion launch daemon.
# 1.1 - Moved binary and log locations to /usr/local/robotcloud.
# 1.2 - Code improvements and added compatibility with OS X 10.9 Mavericks.
@ryanmoon
ryanmoon / remove-app-and-re-install.md
Last active November 23, 2015 17:36
How to remove an Application so that you can re-install it from the Apple App Store

Instructions

With the App Store cert debacle, I ran into an issue with Reeder, and other apps.

Method 1

  • Remove the app, either via the Finder or via Terminal sudo rm -rf /Applications/Reeder.app
  • Find out the pkg id for the Application pkgutil --pkgs | grep reeder
@ryanmoon
ryanmoon / AdobeAnywhereLDAPConfig
Created January 21, 2016 23:03
AdobeAnywhereLDAPConfig when using an OS X Open Directory
com.day.crx {
com.day.crx.core.CRXLoginModule sufficient
tokenExpiration="43200000";
com.day.crx.security.ldap.LDAPLoginModule required
principal_provider.class="com.day.crx.security.ldap.principals.LDAPPrincipalProvider"
host="$IP_OR_FQDN"
port="389"
secure="false"
userIdAttribute="uid"
groupRoot="cn=groups,dc=$HOST,dc=$DOMAIN,dc=com"
@ryanmoon
ryanmoon / test-kitchen-fail
Created January 26, 2016 18:00
Test Kitchen Fail
httpd::default
Command "curl http://localhost"
stdout
should match /WARNING/ (FAILED - 1)
Failures:
1) httpd::default Command "curl http://localhost" stdout should match /WARNING/
Failure/Error: its(:stdout) { should match (/WARNING/) }
ttp://www.centos.org/\"><img src=\"/icons/poweredby.png\" alt=\"[ Powered by CentOS Linux ]\" width=\"88\" height=\"31\" /></a></p>\n\t\t\t\t</div>\n\t\t\t</div>\n </div>\n <div class=\"content\">\n<div class=\"content-middle\"><h2>About CentOS:</h2><b>The Community ENTerprise Operating System</b> (CentOS) Linux is a community-supported enterprise distribution derived from sources freely provided to the public by Red Hat. As such, CentOS Linux aims to be functionally compatible with Red Hat Enterprise Linux. The CentOS Project is the organization that builds CentOS. We mainly change packages to remove upstream vendor branding and artwork.</p> <p>For information on CentOS please
@ryanmoon
ryanmoon / Fix for Older Ruby Symbols or Strings to Newer Approach
Last active January 26, 2016 23:24
Fix for Older Ruby Symbols/Strings to Newer Approach
find . -name \*.rb -exec perl -p -i -e 's/([^:]):(\w+)\s*=>/\1\2:/g' {} \;
@ryanmoon
ryanmoon / Adobe Version Finder
Created February 4, 2016 23:52
Adobe Version Finder, finds current version of installed Adobe CC 2015 Applications
#!/bin/bash
#########################################
# Adobe CC 2015 Version Finder
# Ryan Moon
# Created on 2016-02-04
# Version 1.0.0 on 2016-02-04
#########################################
# This script gets the CFBundleShortVersionString
# of the Adobe CC 2015 Applications.
# Handy for reference when looking at multiple