krypted.com

Tiny Deathstars of Foulness

Tools that leverage the Xcode Command Line Tools might have a problem if you install the tools without agreeing to the license. Here, you can see IntelliJ complaining about just that: Screen Shot 2014-09-19 at 2.52.57 PM To agree to the license agreement, you can use xcrun along with the cc verb: sudo xcrun cc This is an interactive command line environment so in order to script it you’d need to use expect to feed in the correct parameters.

September 26th, 2014

Posted In: Mac OS X

Tags: , , , , , , ,

Microsoft Azure is Microsoft’s cloud services. Azure can host virtual machines and act as a location to store files. However, Azure can do much more as well, providing an Active Directory instance, provide SQL database access, work with hosted Visual Studio, host web sites or provide BizTalk services. All of these can be managed at https://manage.windowsazure.com. windows_azure_logo6 You can also manage Windows Azure from the command line on Linux, Windows or Mac. To download command line tools, visit http://www.windowsazure.com/en-us/downloads/#cmd-line-tools. Once downloaded, run the package installer. Screen Shot 2013-11-29 at 10.51.01 PMWhen the package is finished installing, visit /usr/local/bin where you’ll find the azure binary. Once installed, you’ll need to configure your account from the windowsazure.com site to work with your computer. To do so, log into the windowsazure.com portal. Screen Shot 2013-12-01 at 8.25.57 PM Once logged in, open Terminal and then use the azure command along with the account option and the download verb: azure account download This account downloads the .publishsettings file for the account you’re logged in as in your browser. Once downloaded, run azure with the account option and the import verb, dragging the path to your .publishsettings file from https://manage.windowsazure.com/publishsettings/index?client=xplat: azure account import /Users/krypted/Downloads/WindowsAzure-credentials.publishsettings The account import then completes and your user is imported into azure. Once imported, run azure with the account option and then storage list: azure account storage list You might not have any storage configured yet, but at this point you should see the following to indicate that the account is working: info: No storage accounts defined info: account storage list command OK You can also run the azure command by itself to see some neat ascii-art (although the azure logo doesn’t really come through in this spiffy cut and paste job): info: _ _____ _ ___ ___________________ info:        /_\  |__ / | | | _ \ __| info: _ ___ / _ \__/ /| |_| |   / _|___ _ _ info: (___ /_/ \_\/___|\___/|_|_\___| _____) info: (_______ _ _) _ ______ _)_ _ info: (______________ _ ) (___ _ _) info: info: Windows Azure: Microsoft's Cloud Platform info: info: Tool version 0.7.4 help: help: Display help for a given command help: help [options] [command] help: help: Open the portal in a browser help: portal [options] help: help: Commands: help: account to manage your account information and publish settings help: config Commands to manage your local settings help: hdinsight Commands to manage your HDInsight accounts help: mobile Commands to manage your Mobile Services help: network Commands to manage your Networks help: sb Commands to manage your Service Bus configuration help: service Commands to manage your Cloud Services help: site Commands to manage your Web Sites help: sql Commands to manage your SQL Server accounts help: storage Commands to manage your Storage objects help: vm Commands to manage your Virtual Machines help: help: Options: help: -h, --help output usage information help: -v, --version output the application version Provided the account is working, you can then use the account, config, hdinsight, mobile, network, sb, service, site, sql, storage or vm options. Each of these can be invoked along with a -h option to show a help page. For example, to see a help page for service: azure service -h You can spin up resources including sites, storage containers and even virtual machines (although you might need to create templates for VMs first). As an example, let’s create a new site using the git template: azure site create --git Overall, there are a lot of options available in the azure command line interface. The web interface is very simple, with options in the command line interface mirroring the options in the web interface. Running and therefore scripting around these commands is straight forward. I wrote up some Amazon stuff previously at http://krypted.com/commands/amazon-s3cmd-commands, but the azure controls are really full featured and I’m really becoming a huge fan of the service itself the more I use it (which likely means I’ll post more articles on it soon).

December 2nd, 2013

Posted In: cloud, Network Infrastructure, SQL, Ubuntu, Unix, VMware, Windows Server

Tags: , , , , , , , , , , ,

From xkcd.com, but seemingly the story of my life.

January 30th, 2009

Posted In: Mac OS X

Tags: , , ,

I posted another article at Xsanity last week, but forgot to mention it here.  You can find the article here. Basically it’s a walkthrough of using the fibreconfig command and how it relates to Xsan. Hope you enjoy!

January 28th, 2009

Posted In: Xsan

Tags: , ,

HFS+ and resource forks.  Still a necessary evil.  At times I find that I need to remove a resource fork from the command line, leaving the file otherwise in tact. To do so, first create an empty file.  In this case I’ll create a file using touch called todelete, so I remember to delete it:  touch todelete Now we’re going to copy this empty file over the resource fork for the file myvideo.mov using the cp command: cp todelete myvideo.mov/rsrc At this point, we can clean up the original file we created previously using rm: rm todelete

November 13th, 2008

Posted In: Mac OS X

Tags: , ,

Immediately activate the screen saver in OS X by using this command: /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine & You can invoke this from a script, through ARD, etc.

November 10th, 2008

Posted In: Mac OS X, Mac OS X Server

Tags: ,

Today I received a copy of Mac OS X for Unix Geeks from O’Reilly, for which I was the technical editor on.  Great read, especially for the *nix to Mac switcher.  Check it out here: Big pat on the back to Brian Jepson, Ernest Rothman and Rich Rosen for releasing a great new version of their book!

September 26th, 2008

Posted In: Articles and Books, Mac OS X

Tags: , , , , ,

dirt is a new utility in Leopard that can be used to test Directory Services.  You can use dirt to test authentication for LDAP or Active Directory.   The -u flag uses the username from the node you are testing against, in the above example it is the Active Directory username.  dirt tests whether an account exists in any node and can be used with the following structure:
dirt -u username -n
This would result in the following output if the account is located in Active Directory:
User username was found in:
/Active Directory/domainname
The -p flag can also be used to test passwords.  You can also specify the node in Directory Services you would like to test against rather than rely on dirt to cycle through all available nodes.

May 19th, 2008

Posted In: Active Directory, Mac OS X, Mac OS X Server

Tags: , , , ,

If we were in the directory Desktop and wanted to backup all the files to a tarball called backups.tar, we could issue this command:  tar cvf backups.tar . The flags here:c creates an archive, v makes the process run verbose and f sets the file name.  The . tells tar to back up the current working directory.  Use pwd if you’re unsure what that is.  As we didn’t tell tar where to put the file it will automagically put it in the working directory.  By default tar is recursive although you can specify an n flag to alter that default behavior.   Now, to display the contents of the tar file we just created, we can invoke tar using the tvf flags like so:  tar tvf backups.tar This uses the t to display the table of contents of the file, the v to do so verbosely and the f to list the filename of the tarball.  To extract all of the files from the tarball you can then use the xvf flags like so:  tar xvf backups.tar This uses the x flag to extract, the v to do so verbosely and the f to indicate the file name of the tarball.  If you wanted to only extract one file you would list that file name at the end of the command (start with source tar file then source file).  You can also use wild cards in either the creation or extraction of a tarball.  You can also use gzip utility with tar to compress the data by adding the z flag.  Anyway, hope this helps in your backup endeavors.

May 14th, 2008

Posted In: Mac OS X, Mac OS X Server, Ubuntu, Unix

Tags: , , ,

You can use the command line tool opfw to set open firmware passwords.  It is available for download over at MacEnterprise.org.  You can also use opfw to mass deploy open firmware passwords, which is basically what NetRestore does when you use their setting for this.

March 13th, 2008

Posted In: Mac OS X, Mac OS X Server, Mass Deployment

Tags: , , ,

Next Page »