Here are some great OmniGraffle Tips and Tricks!
Archive for the ‘Scripts’ Category
OmniGraffle Tips & Tricks
Tuesday, December 1st, 2009Open Directory Auto Archiver
Saturday, October 3rd, 2009Have you struggled with Open Directory backups? Do you open up Server Admin and click on the Archive button when an alarm in your calendar tells you to do so? Well, we’re gonna’ help you out then. We’re going to automate backing up your Open Directory. We’re going to invoke the backups through launchd and we’re going to keep them for an amount of time you determine and automatically prune the old ones. We’re going to let you choose the location to store them and the password to unlock them. And we’re going to let you do all this through a graphical package called the 318 Auto Archiver.
Originally written for our own staff we now open it up to you as well.
Oracle Buys Sun
Monday, April 20th, 2009Sun was in merger talks with IBM. Talks that had fallen through. Today, the Sun website says “Oracle to Buy Sun.” Oracle is the largest database company in the world and has been tinkering with selling support contracts for Linux and the Oracle suite of database products, that already includes PeopleSoft, Hyperion and Siebel. This merger, valued at $7.4Billion, will give Oracle access to sell hardware bundled solutions, further the Oracle development product offerings and give Oracle one of the best operating systems for running databases on the planet.
Oracle doesn’t just get hardware and Solaris though. This move also solidifies a plan for Oracle customers to integrate Sun storage. Oracle had previously been working with HP in a partnership that never seemed to gain traction. Then there is Java, MySQL, VirtualBox, GlassFish and OpenOffice.org. A number of the Sun contributions will be Open Source projects, but overall it’s possible to see a strategy that can emerge from a new Oracle + Sun organization.
As a Sun partner, 318 can assist its clients through this transition, be it with storage, MySQL, Java, Solaris or Oracle middleware scripting. Overall, this deal makes a lot of sense and 318 is behind doing whatever possible to ease our clients through the transition.
Finally, for those concerned that Oracle might just be buying Sun to kill off MySQL, keep in mind that the Open Source community built MySQL in the first place (or was integral to building it) and it can build another in its place just as easily, this time faster and with less required legacy support. MySQL is not a fluke. PostgreSQL or a newer solution will take its place if MySQL were to fall by the wayside under the Oracle helm. Oracle is not going to make MySQL into a martyr of sorts, and is going to want to capitalize on their investment (a Billion dollar purchase by Sun and obviously part of this purchase); especially with a clear business plan for MySQL to be profitable (which is why Sun bought them for such a lofty price in the first place). Overall, Oracle has no reason to kill MySQL; instead, with Siebel, MySQL, Oracle, PeopleSoft, etc – they can simply tout “All Your Databasen Are Belong To Us!”
ESX Patch Management
Tuesday, April 14th, 2009VMware’s ESX Server, like any system, needs to be updated regularly. To see what patches have been installed on your ESX server use the following command:
esxupdate -query
Once you know what updates have already been applied to your system it’s time to go find the updates that still need to be applied. You can download the updates that have not yet been run at http://support.vmware.com/selfsupport/download/. Here you will see a bevy of information about each patch and can determine whether you consider it an important patch to run. At a minimum, all security patches should be run as often as your change control environment allows. Once downloaded make sure you have enough free space to install the software you’ve just downloaded and then you will need to copy the patches to the server (using ssh, scp or whatever tool you prefer to use to copy files to your ESX host). Now extract the patches prior to running them. To do so use the tar command, as follows:
tar xvzf
.tgz
Once extracted, cd into the patch directory and then use the esxupdate command with the update flag and then the test flag, as follows:
esxupdate –test update
Provided that the update tests clean, run the update itself with the following command (still with a working directory inside the extracted tarball from a couple of steps ago):
esxupdate update
There are a couple of flags that can be used with esxupdate. Chief amongst them are -noreboot (which doesn’t reboot after a given update), -d, -b and -l (which are used for working with bundles and depots).
If esxupdate fails with an error code these can be cross referenced using the ESX Patch Management Guide.
You can also run patches without copying the updates to the server manually, although this will require you to know the URL of the patch. To do so, first locate the patch number that you would like to run. Then, open outgoing ports on the server as follows:
esxcfg-firewall -allowOutgoing
Next, issue the esxupdate command with the path embedded:
esxupdate –noreboot -r http://
update
Once you’ve looped through all the updates you are looking to run, lock down your ESX firewall again using the following command:
esxcfg-firewall -blockOutgoing
Mac OS X: Show Only Active Apps in the Dock
Thursday, April 2nd, 2009The dock should have the applications you commonly need to get to. However, some simply want it to show them the applications that are open. You can do this by running the following command:
defaults write com.apple.dock static-only -bool TRUE
Once run, reboot, or just restart your dock with the following command:
killall Dock
To undo it:
defaults write com.apple.dock static-only -bool FALSE
Kerberos Pruning Script
Friday, October 26th, 2007I have noticed that over time inconsistancies can arise where a machine entry will be deleted from LDAP but the relevant kerberos principals remain in the KDC. Here’s a small script that I wrote up to help prune out unwanted/stale kerberos principals. Obviously great care must be taken when running this script; if you delete a principal that is still in use, things ARE going to break. So, think before you type. That being said, if you’re not interested in typing 20 delprinc commands, this script is for you.
Usage: %pruneKerb.sh query
pruneKerb will then list all principals matching “query” (standard case-sensitive grep match)
It takes a single argument query and outputs a list of matching
kerberos principals, presenting the user with the option to delete individual principals, all principles or simply print a list of matching principals.
Please read the scripts’ comments for more information.















