Posts Tagged ‘quicky’

Add OS X Network Settings Remotely (Without Breaking Stuff)

Monday, September 23rd, 2013

So you’re going to send a computer off to a colocation facility, and it’ll use a static IP and DNS when it gets there, the info for which it’ll need before it arrives. Just like colo, you access this computer remotely to prepare it for its trip, but don’t want to knock it off the network while prepping this info, so you can verify it’s good to go and shut it down.

It’s the type of thing, like setting up email accounts programmatically, that somebody should have figured out and shared with the community as some point. But even if my google-fu is weak, I guess I can deal with having tomatoes thrown at me, so here’s a rough mock-up:

 

#!/bin/bash
# purpose: add a network location with manual IP info without switching 
#   This script lets you fill in settings and apply them on en0(assuming that's active)
#   but only interrupts current connectivity long enough to apply the settings,
#   it then immediately switches back. (It also assumes a 'Static' location doesn't already exist...)
#   Use at your own risk! No warranty granted or implied! Tell us we're doing it rong on twitter!
# author: Allister Banks, 318 Inc.

# set -x

declare -xr networksetup="/usr/sbin/networksetup"

declare -xr MYIP="192.168.111.177"
declare -xr MYMASK="255.255.255.0"
declare -xr MYROUTER="192.168.111.1"
declare -xr DNSSERVERS="8.8.8.8 8.8.4.4"

declare -x PORTANDSERVICE=`$networksetup -listallhardwareports | awk '/en0/{print x};{x=$0}' | cut -d ' ' -f 3`

$networksetup -createlocation "Static" populate
$networksetup -switchtolocation "Static"
$networksetup -setmanual $PORTANDSERVICE $MYIP $MYMASK $MYROUTER
$networksetup -setdnsservers $PORTANDSERVICE $DNSSERVERS
$networksetup -switchtolocation Automatic

exit 0

Caveats: The script assumes the interface you want to be active in the future is en0, just for ease of testing before deployment. Also, that there isn’t already a network location called ‘Static’, and that you do want all interface populated upon creation(because I couldn’t think of particularly good reasons why not.)

If you find the need, give it a try and tweet at us with your questions/comments!


The ‘Hidden’ Summary Tab

Friday, August 9th, 2013

Do you want AirPort Utility to look how it used to? Howsabout something akin to the Logs interface you could use to see connected client’s? Well, mashing the option key has paid off again! As alerted to me on the Twitter via an @dmnelson re-tweet, https://twitter.com/jeff_lamarche/status/364905545272012800


This doesn’t really get you more in the way of features, but when change is scary and goes jingly-jangly in our pockets, seeing a familiar modal dialog makes us feel at ease.

summary

A Bash Quicky

Thursday, August 30th, 2012

In our last episode spelunking a particularly shallow trough of bash goodness, we came across dollar sign substitution, which I said mimics some uses of regular expressions. Regex’s are often thought of as thick or dense with meaning. One of my more favorite descriptions goes something like, if you measured each character used in code for a regex in cups of coffee, you’d find the creators of this particular syntax the most primo, industrial-strength-caffeinated folks around. I’m paraphrasing, of course.

Now copy-pasta-happy, cargo-culting-coders like myself tend to find working code samples and reuse salvaged pieces almost without thinking, often recognizing the shape of the lines of code more than the underlying meaning. Looping back around to dollar sign substitution, we can actually interpret this commonly used value, assigned to a variable meaning the name of the script:
${0##*/}
Okay children, what does it all mean? Well, let’s start at the very beginning(a very good place to start):
${0}The dollar sign and curly braces force an evaluation of the symbols contained inside, often used for returning complex series of variables. As an aside, counting in programming languages starts with zero, and each space-separated part of the text is defined with a number per place in the order, also known as positional parameters. The entire path to our script is given the special ‘seat’ of zero, so this puts the focus on that zero position.

Regrouping quickly, our objective is to pull out the path leading up to the script’s name. So we’re essentially gathering up all the stuff up to and including the last forward slash before our scripts filename, and chuckin’ them in the lorry bin.
${0##*}To match all of the instances of a pattern, in our case the forward slashes in our path, we double up the number signs(or pound sign for telcom fans, or hash for our friends on the fairer side of the puddle.) This performs a “greedy” match, gobbling up all instances, with a star “globbing”, to indiscriminately mop up any matching characters encountered along the way.
${0##*/}Then we cap the whole mess off by telling it to stop when it hits the last occurrence of a character, in this case forward slash. And that’s that!

Pardon the tongue-in-cheek tone of this quick detour into a bash-style regex-analogue… but to reward the masochists, here’s another joke from Puppet-gif-contest-award-winner @pmbuko:

Email from a linux user: “Slash is full.” I wanted to respond: “Did he enjoy his meal?”

Searching for the hidden Library folder?

Tuesday, March 6th, 2012

Just a quick note, came across this tip today for another way to get to the (hidden in Lion) Library folder: from the Finder’s Go menu, hold down Option.

PresSTORE Article on Xsanity

Tuesday, November 16th, 2010

We have posted a short article on the availability of PresSTORE 4.1 on Xsanity at http://www.xsanity.com/article.php/20101116105720183. Enjoy!

Uninstalling Retrospect 6.3 Clients and Changing Passwords

Wednesday, May 12th, 2010

Open the retrospect client and turn it off. Then close it and delete the \Libraries\Preferences\retroclient.state file. Now you have two options. To completely uninstall, just trash the app from the Application folder. Or if you just needed to reset the password, you can rerun the installer and it will prompt you for a password.

CS5 Shipping

Friday, April 30th, 2010

Adobe CS5 is now shipping. To download a demo check out https://www.adobe.com/cfusion/tdrc/index.cfm?product=design_premium. Some new features include perspective drawing, width tool, shape builder, live view, browser lab, multiple page sizes, spanning, splitting and a new gap tool. Lots of new goodness here!

Whether you are installing it for 2 computers or 2,000, 318 can help with all aspects of your upgrade. Contact your account manager today, or sales@318.com for more information.

WWDC 2010

Wednesday, April 28th, 2010

The annual Apple WorldWide Developers Conference, WWDC, has been announced for June 7th through June 11th. The Developers Conference will again be held in the Moscone Center in San Francisco and this year will be solely focused on development, having no IT track. To see a list of sessions, click here.

As part of WWDC, Apple also hands out a number of design awards. If you have any applications you would like to nominate for a design award then you can do so here.

Creating Subfolders in Apple’s Mail Application

Tuesday, April 20th, 2010

In Mac Mail, the folders are called “mailboxes”. I know, it’s pretty confusing to me too.

Creating a Subfolder

We’ll take your Work folder as an example. Say you want to create a folder called “morework”.

1. Click on the Work folder
2. Click on the “Mailbox” menu up on top
3. Click on “New Mailbox”
4. It will confirm that you want to make the new mailbox (folder) within “Work” and ask you to name in.
5. Name it: morework
6. You will now see a new mailbox (folder) called “morework” under the mailbox (folder) called “Work”.

Mighty Mouse Unleashed!

Thursday, December 31st, 2009

If you have been wondering what more you can do with that shiny new Mighty Mouse then get ready. MagicPrefs, from Vlad Alexa allows you to do the following:

- It features the ability to bind a variable number of finger clicks, taps, swipes, pinch and other gestures to functions like Middle Click , Hold Down Both Mouse Buttons , Spaces , Expose, Dashboard etc.
- Touch Sensitivity implements a single point control for a number of factors impacting the algorithms of the taps, swipes, pinche and other gestures.
- Tracking Speed adds the ability to increase the maximum mouse speed by a extra 200%.
- Also featured is a real-time display of the fingers touching the surface of the mouse that you can enable to test and monitor the way the mouse sees fingers.

Background Checks? There’s an App for That!

Thursday, December 24th, 2009

Apple’s App store is a veritable wild west movie of products; business, pleasure, pleasure disguised to look like business, useful tools that are free and do-nothing apps that cost $999.99.

Beenverified.com has released a “free” app that allows you to run background checks right from your iPhone. While this isn’t a new idea, the app is well designed and you get three free searches a week. Since it’s just been released, you can only run one search at a time due to high server demand, but the searches are accurate and in-depth. It was able to produce not only basic information about those of us that have tried it, but also gave a complete histories of houses, including past owners, past occupants and the house’s current market value, amongst other things!

Upgrading and troubleshooting a “the database is a different version” error with QuickBooks

Wednesday, December 16th, 2009
  1. Check the versions of quickbooks by hitting F2 (fn + F2 on mac) during the opening of quickbooks. You must do this on every workstation and that quickbooks is installed. On the top it should say something like Release R10p. All versions must be the same to work with each other.
  2. Go to quickbooks.com/support click on product updates, select the version of quickbooks and download the latest updated version of quick books for every workstation and server.
  3. Next you must open the quickbooks on the share where the quickbook files exist. From this you must open every quickbook file and update it to the latest version. You will be prompted to back up the files first so make sure you do.
  4. After all the files are updated and the users are updated you will be able to access the files again.

Screen Shots & ARD

Tuesday, December 8th, 2009

For what it’s worth, we take ours from the command line. It helps keep proper track of the names screens. Simply open up a terminal window on a remote server via Apple Remote Desktop (ARD) and run the following command:

sleep 3; screencapture -iw ~/Desktop/filename.png

When you run that full string as a command you’ll have 3 seconds after hitting enter to highlight your target window, at which point your cursor will switch to the photo in window selection mode. Alternatively, you can run:

sleep 3; screencapture -iwc

Which will capture the picture to the remote machines clipboard (and can then be copied via ARD, and opened in Preview (File->new from clipboard).

New CLI Options in Final Cut Server

Wednesday, November 25th, 2009

For those of us who thought that the Final Cut Server 1.5.1 update was just a couple of minor bug fixes, there’s a little more than meets the eye. If you run /Library/Application Support/Final Cut Server/Final Cut Server.bundle/Contents/MacOS/fcsvr_client then you’ll note that there are a few fun new features. While there hasn’t been enough time to thoroughly put the new options through their paces, we do hope to do further reporting on them as we become more comfortable with leveraging them for automations. Stay tuned!

ATTO Fibre Channel + Snow Leopard

Tuesday, November 24th, 2009

If you’re using the ATTO card along with Snow Leopard then the 2.41MP driver on their website is compatible with 10.6, but they have yet to update the website to reflect that it is. These are the drivers for 42ES coupled with the EMC Clarion system:
http://attotech.com/product.php?model=80

You may want to check with Tech Support, but it appears the latest 10.5 drivers will work with 10.6

Resolving Qmaster Problems with Xsan

Thursday, November 5th, 2009

When using qmaster in an Xsan environment, it is often desirable to use the Xsan volume for qmaster cluster storage, this allows all qmaster render nodes on the xsan to directly access assets for rendering, rather than having to pull the assets over NFS. However, a race condition exists where when qmasterd fires prior to an xsan volume being mounted, qmaster will create a folder structure at the Volume’s mount path, which prevents proper mounting of the Xsan volume.

To resolve the issue, you can set a delay on the qmaster daemon to give sufficient time for the Xsan volumes to properly mount. This can be done by editing the file located at /Library/LaunchDaemons/com.apple.qmasterd.plist and changing it’s contents to match the following, which adds a 60 second delay prior to qmasterd starting:



Label
com.apple.qmaster.qmasterd
ProgramArguments

/bin/bash
-c
/bin/sleep 60; /usr/sbin/qmasterd

OnDemand

Non-profits in Need of GroupWare?

Tuesday, November 3rd, 2009

Not-for-profit and looking at options for messaging and groupware moving forward? Then you need to take a 2nd or even a 3rd look at Google Apps! Not-for-profit organizations with less than 3,000 users can get Google Apps Education Edition for free! For a not-for-profit with more than 3,000 users you can get Google Apps Premier Edition at a 40% discount.

Imagine all the infrastructure that can be repurposed, all the networking and message hygiene that you won’t have to do any more and most importantly, how happy the users will be. If your interest is piqued, give 318 a call today and we’ll be happy to work with you on a strategy, whether it’s Google Apps, Microsoft Exchange, Zimbra, Mac OS X Server, etc – 318 is platform-agnostic and here to help!

Reading Virtual Memory Stats

Thursday, October 29th, 2009

The vm_stat command in Mac OS X will show you the free, active, inactive, wired down, copy-on-write, zero filled, and reactivated pages for virtual memory utilization. You will also see the pageins as well as pageouts. If you wish to write these statistics routinely then you can use the vm_stat command followed by an integer. For example, to see the virtual memory statistics every 5 seconds:

vm_stat 5

The iPhone USB Jump Drive

Tuesday, October 13th, 2009

When you plug in the iPhone, iTunes opens up automatically as does iPhoto if you have any images in your Photo Roll. But what if you want to use your iPhone as a regular old USB jump drive? Run this little program:
http://code.google.com/p/iphonedisk/

Thawte No Longer Offering Free Certificates

Monday, October 12th, 2009

Thawte is no longer offering free accounts for mail. As an interim, they are going to offer a free year (through a partner deal) of VeriSign’s similar service which is then $19 after that initial year.
https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=AD196&actp=LIST&viewlocale=en_US

318 & MacWorld 2010

Thursday, September 24th, 2009

318 is proud to announce that we will have 3 speakers doing a total of 4 sessions at the upcoming MacWorld Conference & Expo in San Francisco in February. Speakers will be Beau Hunter, Zack Smith and Charles Edge.

We will also be announcing some events as the conference gets closer. If you are planning to attend then you can sign up here. We hope to see you there!

MXLogic Acquired by McAfee

Thursday, September 3rd, 2009

McAfee has announced that they will be acquiring MXLogic, outsourcer of message hygiene solutions. This strengthens the cloud offerings from McAfee and also brings one of the better known spam names into the umbrella of a larger entity. This move should allow MXLogic to strengthen offerings while allowing McAfee to bundle further services into existing MXLogic environments.

Screenshots in Snow Leopard

Monday, August 31st, 2009

In Mac OS X 10.5 and below, the default behavior was to take screenshots (command-Shift-4) by creating a file on the desktop automatically named Picture 1.png. The second file would be created as Picture 2.png and so forth. In Snow Leopard though, the screen shots are named Screen shot followed by the date (YYYY-MM-DD) and then the time (HH.MM.SS). So if I took a screen shot at 3pm today it would be called “Screen shot 2009-08-31 at 3.01.05 PM”. This keeps them showing up in the same order they otherwise would have. At first I wasn’t sure whether I liked this change, but now I’m sure that I do. The defaults commands that were used to change the default image type and the location are still applicable.

Mac OS X Server 10.6 Announced

Monday, June 8th, 2009

You can read the press release at Apple. Highlights include:

  • Half the cost: $499 for Unlimited Clients
  • NetRestore is now bundled with Mac OS X Server
  • Wiki2 includes iPhone and QuickLook-type image display
  • Address Book Server now included
  • iCal Server works with iPhone
  • Push Email Support
  • New iPhone Configuration Utility
  • Supa-fast (OK, that last part is not official)

Disable Flash Auto-Load

Tuesday, May 19th, 2009

ClickToFlash is an alternative flash plugin for Safari.

It prevents flash from autoloading on a webpage, you have the ability to add certain domains to a whitelist, or you can just “click to flash” to load the flash element for only that instance.

Great for browsing flash heavy websites that love to blast music and bring your browser to a crawl as flash loads. Also

One drawback is if the flash is old and includes an out of date version check, it will report your flash plugin as needing to be upgraded (this is because clicktoflash hijacks the primary flash file type handler, and then when clicked, changes the filetype to an older one that Adobe still recognizes).

Direct link to download version 1.4.1 (current as of this writing): http://s3.amazonaws.com/clicktoflash/ClickToFlash-1.4.1.zip

Works in Safari 3 and 4 beta, but only 10.5 for now.

Safari Browsing and Sonicwall Enhanced

Friday, May 15th, 2009

Thanks to one Ed Marczak and earlier hinted at here we had a fix for a SonicWALL issue that was bugging us from awhile back. With SonicOS Enhanced and Content Filtering Service, Safari experiences errors trying to load pages that require a login, such as store.apple.com and www.amazon.com. This even occurs when CFS is not enabled on your Sonicwall.

To fix this, you need to uncheck the “Enforce Host Tag Search with for CFS” feature on the SonicWALL. In order to uncheck “Enforce Host Tag Search with for CFS”, you have to login to sonicwall console and then go to diag page, which is accessible by logging into the sonicwall and replacing the webpage name with diag.html.

For example, if you log into http://192.168.1.1/main.html you have to replace main with diag; that is: http://192.168.1.1/diag.html

This page will bring the internal settings page of the SonicWALL, and from here you can uncheck “Enforce Host Tag Search with for CFS”.

Add Copy To and Move To Contextual Menus in Windows 7

Tuesday, May 5th, 2009

As with XP and Vista, Windows 7 doesn’t have the uber-useful (to us at least) Move To and Copy To options in the contextual menu’s by default. To create a Copy To menu item, go to the HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers location in the registry and create a new Default key with a name of Copy To and a value of {C2FBB630-2971-11D1-A18C-00C04FD75D13}. To create a Move To menu item, go to HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers (the same location) and add a new Default key with a name of Move To and a value of {C2FBB631-2971-11D1-A18C-00C04FD75D13}. Now you should have the menu items. Notice that the keys are only different in the 30 at the end of the first string of hex numbers…

Restoring Data From Rackspace

Wednesday, April 1st, 2009

Rackspace provides a managed Backup Solution. The backups are available for up to 1 Month back. 2 Weeks of Backups are located on their premises, and the previous 2 Weeks are stored offsite. If the files to restore are within that period your restore time will take longer, as they will have to move the tapes from their offsite location to Onsite to start the restore process.

Restores can either be performed from Rackspace’s Web Portal or a support phone call.

Calling Rackspace
1-800-961-4454
Supply Account Name and Password
State you want to Restore Files, windows or linux computer
Give Backup Operator File Path, and Date to Restore From
A Ticket will be created, and updated with the Restore Process. This ticket will be updated when the Restore is complete, and Will Include the Directory of the Restore Data.

Disable Shadows for Screen Shots

Wednesday, March 4th, 2009

Shadows make our screen shots look better. But we can’t always use them. There are times when we need to go ahead and disable them due to some reason or another. If you need to disable the shadows on screen captures, you can do so using the following command:
defaults write com.apple.screencapture disable-shadow -bool true

To then enable the shadows, you would use the following command:
defaults write com.apple.screencapture disable-shadow -bool false

Automating Craigs’ List

Tuesday, February 17th, 2009

Craigslist is a great place to find all kinds of things.  But sometimes you need to keep looking for something, over and over for months on end until you find it.  Maybe it’s something you just don’t want to pay for or maybe it’s someone that wants that thing you just don’t want to throw out (like that bondi blue iMac).  Either way, there’s a site that will search Craigslist for you and  email you when a pattern that matches your search appears.  Simply do a search on Craigslist, copy the URL from your address bar in your web browser and then open CraigsListWatch.com. Here, you can paste in the URL, enter your email address and every other hour they will look for new postings that match your criteria. This is a great way to take so much stuff and automate your searches, without having to write an Automator workflow to do so!