Skip to content

Instantly share code, notes, and snippets.

View jhbush's full-sized avatar

Jason Bush jhbush

  • Coffee Cats Consulting
  • San Francisco Bay Area
  • 06:58 (UTC -08:00)
  • X @jasonhbush
View GitHub Profile
@talkingmoose
talkingmoose / CommunicatorSetup-1.0.sh
Created March 7, 2012 22:52
Shell script to configure Microsoft Communicator user name and email address
#!/bin/sh
########################### About this script ##########################
# #
# Purpose: Populates user name and email address settings #
# for Communicator 2011 for Mac. This script resides #
# in /Library/talkingmoose/Scripts and is launched #
# by launch agent net.talkingmoose.CommunicatorSetup.plist. #
# #
# Created by William Smith #
@talkingmoose
talkingmoose / net.talkingmoose.CommunicatorSetup.plist
Created March 8, 2012 15:37
Launch agent for CommunicatorSetup-1.0.sh script
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.talkingmoose.CommunicatorSetup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>/Library/talkingmoose/Scripts/CommunicatorSetup-1.0.sh</string>
@fernandoaleman
fernandoaleman / Linux Static IP
Created March 23, 2012 16:20
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@timsutton
timsutton / com.adobe.Acrobat.Pro.plist
Created June 17, 2012 01:45
Suppress updates, offer to associate PDFs with Acrobat, EULA
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>10</key>
<dict>
<key>AVAlert</key>
<dict>
<key>Checkbox</key>
<array>
@rockpapergoat
rockpapergoat / EnCase
Created June 21, 2012 15:52
encase pkg parts
#!/bin/sh
. /etc/rc.common
StartService ()
{
ConsoleMessage "Starting EnCase Servlet"
/usr/local/sbin/enosxintel -d -p /usr/local/sbin
}
StopService ()
{
ConsoleMessage "Stopping EnCase Servlet"
@kassi
kassi / init.sh
Created July 18, 2012 20:55
System Setup: OSX
# System
# install homebrew: http://mxcl.github.com/homebrew/
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
brew install ack
brew install bash-completion
# Development Tools
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active November 14, 2024 17:18
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@KylePDavis
KylePDavis / sh_env_var_opts.sh
Last active September 14, 2023 01:26
Simple bash shell script templates. There are two versions: 1) simple env var based options, and 2) with added command line argument parsing and error handling.
#!/bin/bash -e
# A SHORT DESCRIPTION OF YOUR SCRIPT GOES HERE
# USAGE:
# DESCRIPTION OF ENV VARS HERE
###############################################################################
set -e # exit on command errors (so you MUST handle exit codes properly!)
set -o pipefail # capture fail exit codes in piped commands
#set -x # execution tracing debug messages
# Get command info
@kcrawford
kcrawford / gist:5474622
Created April 27, 2013 20:41
postflight installer script to reload a LaunchAgent
#!/bin/bash
# if someone is logged in
if who | grep -q console; then
# get the logged in user's uid
LOGGED_IN_UID=`ls -ln /dev/console | awk '{ print $3 }'`
# use the uid and pgrep to find the Finder process id
FINDER_PID=`pgrep -U ${LOGGED_IN_UID} Finder`
@bzerangue
bzerangue / macs-on-active-directory.md
Last active October 12, 2023 21:07
Binding and Unbinding to Active Directory from Mac OS via Command Line

Binding and Unbinding to Active Directory from Mac OS via Command Line

  • Open the Terminal Application
  • Type in sudo -i and type in your Mac Administrator account password. sudo gives you root level or administrator level privileges.

To View current Active Directory Settings

dsconfigad -show

To Unbind a Computer from an Active Directory Domain