<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>LINICKX.com</title><link>https://www.linickx.com/</link><description></description><lastBuildDate>Tue, 19 Aug 2014 18:24:00 +0100</lastBuildDate><item><title>OSX Automator and Python - for mac address conversion</title><link>https://www.linickx.com/osx-automator-and-python-for-mac-address-conversion</link><description>&lt;p&gt;Recently I wrote a &lt;a href="https://www.linickx.com/3970/python-and-mac-addresses"&gt;python script for converting mac
addresses&lt;/a&gt; (which
you can &lt;a href="https://gist.github.com/linickx/6516b5325098665a0898"&gt;download from
github&lt;/a&gt;) and the
reason I wrote it is because I receive emails like this...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.linickx.com/files/2014/08/email_with_mac.png"&gt;&lt;img alt="email_with_mac" src="https://www.linickx.com/files/2014/08/email_with_mac.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The background is, I'm working on an 802.1x project, I need to find the
printer, the quickest solution in this case is to look in the ARP cache
of the router/switch on site.&lt;/p&gt;
&lt;p&gt;The irritant is that in the email the MAC is in EUI format, but
routers/switches are in Cisco's. To Further irritate, Cisco ISE and ACS
use EUI format so if someone sends you a MAC address from a switch or
their windows machine then you need to convert it, I've spent a lot of
time replacing dots and dashes :D&lt;/p&gt;
&lt;p&gt;Today, I realised that I could use &lt;a href="http://support.apple.com/kb/HT2488"&gt;Apple's
Automator&lt;/a&gt; to grab text from
&lt;em&gt;somewhere&lt;/em&gt;... I could then parse it through my python scripts and have
the results in my clip board... ready for pasting!&lt;/p&gt;
&lt;p&gt;Below is my automator workflow&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.linickx.com/files/2014/08/Automator_-_Convert_to_EUI_MAC.png"&gt;&lt;img alt="Automator_-_Convert_to_EUI_MAC" src="https://www.linickx.com/files/2014/08/Automator_-_Convert_to_EUI_MAC.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the python field you can't see the full text... paste in this...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/usr/bin/env python
import sys

addr=str(sys.argv[1])

if "." in addr:
    delimiter = "."
elif ":" in addr:
    delimiter = ":"
elif "-" in addr:
    delimiter = "-"

# Eliminate the delimiter
m = addr.replace(delimiter, "")

# Normalise Case
m = m.lower()
u = m.upper()

eui= ":".join(["%s%s" % (m[i], m[i+1]) for i in range(0,12,2)])

print eui
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you've having issues creating a new automator service from the
screenshot I have uploaded my &lt;a href="https://www.linickx.com/files/2014/08/Convert-to-EUI-MAC.workflow.zip"&gt;Convert to EUI
MAC.workflow&lt;/a&gt;
save it to &lt;code&gt;~/Library/Services&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Once you're all setup, you'll be able to right click any mac address and
convert it. I've also created a &lt;a href="https://www.linickx.com/files/2014/08/Convert-to-Cisco-MAC.workflow.zip"&gt;Convert to Cisco
MAC.workflow&lt;/a&gt;
if you need it in router/switch format.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Tue, 19 Aug 2014 18:24:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2014-08-19:osx-automator-and-python-for-mac-address-conversion</guid><category>apple</category><category>Automator</category><category>Cisco</category><category>mac</category><category>osx</category><category>python</category></item><item><title>OS X: Sync'ing keychains in the iCloud</title><link>https://www.linickx.com/os-x-syncing-keychains-in-the-icloud</link><description>&lt;p&gt;Keychains hold passwords, certificates and general secret stuff - only
do this if you understand the Apple will have access to this.... well
assuming they can crack your keychain password (&lt;em&gt;which they probably
can&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Synchronising a keychain across macs could be useful, for example,
having a dedicated keychain for WiFi credentials.&lt;/p&gt;
&lt;p&gt;I stumbled across &lt;a href="http://forums.appleinsider.com/t/135212/hidden-drop-box-feature-in-mac-os-x-lion-lets-you-sync-files-across-macs"&gt;this link (dated Nov
2011)&lt;/a&gt;
and found that this still works!&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;~Library/Mobile Documents/&lt;/code&gt; folder is pushed to all iCloud enabled
computers, so I have created a new folder, and copied my WiFi keychain
into it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
$ mkdir ~/Library/Mobile\ Documents/com~linickx~icloud
$ cp ~/Library/Keychains/wifi.keychain ~/Library/Mobile\ Documents/com~linickx~icloud/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;If you only have one keychain &lt;code&gt;login.keychain&lt;/code&gt;, consider splitting out
the really secret stuff and only sync'ing the stuff you want to share
with apple.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now open "Keychain Access", delete the original keychain and add/open
the iCloud copy. On any other Mac, add/open the iCloud keychain. Once
complete, any change to the keychain will be pushed to all Macs,
simplifying password changes :)&lt;/p&gt;
&lt;p&gt;I'm also using this to sync &lt;a href="http://dotfiles.github.io"&gt;dotfiles&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;You could use dropbox for this, one reason to use dropbox is that iCloud
sync seems to be a bit hit n miss; however Dropbox already have enough
of my secrets, I'm not suggesting that iCloud is more secure, it's just
better to have many baskets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FOOTNOTE:&lt;/strong&gt; &lt;a href="http://blog.stevex.net/2012/03/icloud-mobile-documents-not-syncing/"&gt;If your mobile documents folder isn't sync'ing, see this
post by
SteveX&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Mon, 06 May 2013 14:20:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2013-05-06:os-x-syncing-keychains-in-the-icloud</guid><category>apple</category><category>iCloud</category><category>keychain</category><category>mac</category><category>OS X</category><category>Security</category></item><item><title>OS X: anonymous ftp directory on Mountain Lion</title><link>https://www.linickx.com/os-x-anonymous-ftp-directory-on-mountain-lion</link><description>&lt;p&gt;Pretty much every google search I tried landed me on a mountain lion
server page, given I'm using &lt;em&gt;normal&lt;/em&gt; mountain lion on a macbook the
results were not much use!&lt;/p&gt;
&lt;p&gt;I use FTP to transfer images to various appliances, firewalls, proxies
etc so for speed and simplicity I need anonymous ftp. The default home
directory on 10.8 for anonymous FTP is /var/empty which is a special
directory which I didn't want to tamper with, once I found the right
stuff in the man page changing the home of thr anonymous FTP user wasn't
actually that hard...&lt;/p&gt;
&lt;p&gt;To get started, in case you need it, the command to start the FTP
service is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo launchctl load /System/Library/LaunchDaemons/ftp.plist
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and to stop:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo launchctl unload /System/Library/LaunchDaemons/ftp.plist
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The config file is &lt;code&gt;/etc/ftpd.conf&lt;/code&gt;, mine looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# match umask from Mac OS X Server ftpd
umask all 022
chroot GUEST /Users/linickx/ftp
modify guest off
umask  guest 0707
upload guest on
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see, I have changed the home directory of my anonymous user
to a folder called &lt;em&gt;ftp&lt;/em&gt; inside &lt;strong&gt;my&lt;/strong&gt; home directory.&lt;/p&gt;
&lt;p&gt;Now, there's some special security stuff you can do to that folder, see
&lt;code&gt;man ftpd&lt;/code&gt; for full details, but this should do you as a &lt;em&gt;minimun&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;\~ftp Make the home directory owned by ``root'' and unwritable by
anyone.&lt;/p&gt;
&lt;p&gt;\~ftp/pub This directory and the subdirectories beneath it should be
owned by the users and groups responsible for placing files in them,
and be writable only by them (mode&lt;br /&gt;
 755 or 775). They should not be owned or writable by ftp or its
group.&lt;/p&gt;
&lt;p&gt;\~ftp/incoming This directory is where anonymous users place files
they upload. The owners should be the user ``ftp'' and an
appropriate group. Members of this group will be&lt;br /&gt;
 the only users with access to these files after they have been
uploaded; these should be people who know how to deal with them
appropriately. If you wish anony-&lt;br /&gt;
 mous FTP users to be able to see the names of the files in this
directory the permissions should be 770, otherwise they should be 370.&lt;/p&gt;
&lt;p&gt;The following ftpd.conf(5) directives should be used:&lt;br /&gt;
 modify guest off&lt;br /&gt;
 umask guest 0707&lt;br /&gt;
 upload guest on&lt;/p&gt;
&lt;p&gt;This will result in anonymous users being able to upload files to this
directory, but they will not be able to download them, delete them, or
overwrite them, due&lt;br /&gt;
 to the umask and disabling of the commands mentioned above.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Happy FTP Everyone!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Mon, 22 Apr 2013 10:31:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2013-04-22:os-x-anonymous-ftp-directory-on-mountain-lion</guid><category>anonymous</category><category>ftp</category><category>mac</category><category>OS X</category></item><item><title>wireshark xquartz osx (mountain lion) - crash on start</title><link>https://www.linickx.com/wireshark-xquartz-osx-mountain-lion-crash-on-start</link><description>&lt;p&gt;If (&lt;em&gt;like me&lt;/em&gt;) you have just installed
&lt;a href="http://www.wireshark.org/"&gt;wireshark&lt;/a&gt; and and
&lt;a href="http://xquartz.macosforge.org/landing/"&gt;xquartz&lt;/a&gt; at the same time
you'll notice that after completing both installations wireshark will
crash and not start up properly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ask.wireshark.org/questions/12140/cant-run-wireshark-in-mac-os-x-mountain-lion"&gt;The wireshark
forum&lt;/a&gt;
shows that if you run wireshark from the command line you get this
error..&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(process:1234): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.

(wireshark-bin:1234): Gtk-WARNING **: cannot open display:
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;... for which there are a couple of work arounds, such as setting your
display variable or opening wireshark from within an xquartz terminal
window.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The actual fix&lt;/strong&gt; was found
&lt;a href="http://networkstatic.net/wireshark-install-on-mac-os-x/"&gt;here&lt;/a&gt;, notice
the log out after installing... by simply &lt;strong&gt;logging out and back in
again&lt;/strong&gt; my wireshark now loads without any nasty work arounds.&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Sun, 24 Mar 2013 11:59:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2013-03-24:wireshark-xquartz-osx-mountain-lion-crash-on-start</guid><category>mac</category><category>osx</category><category>wireshark</category><category>x11</category></item><item><title>OS X: Mediatomb (luanchd) .plist file for automatic start up.</title><link>https://www.linickx.com/os-x-mediatomb-luanchd-plist-file-for-automatic-start-up</link><description>&lt;p&gt;&lt;a href="http://mackenzie.ag/2011/08/16/mac-os-x-lion-launch-daemon-config-for-mediatomb-upnp-server/"&gt;Inspired by
this&lt;/a&gt;,
but better ;)&lt;/p&gt;
&lt;p&gt;So now I have got mediatomb working, I've started on my own StartupItem
so that it loads at boot time. The reason it is &lt;em&gt;better&lt;/em&gt; is because you
can start &lt;strong&gt;and stop&lt;/strong&gt; mediatomb via launchctl.&lt;/p&gt;
&lt;p&gt;I saved the below (&lt;em&gt;the more&lt;/em&gt;) as
&lt;code&gt;/Library/LaunchDaemons/com.linickx.mediatomb.plist&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To start:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo launchctl load /Library/LaunchDaemons/com.linickx.mediatomb.plist
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To stop:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo launchctl unload /Library/LaunchDaemons/com.linickx.mediatomb.plist
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Happy Days!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&amp;gt;
&amp;lt;plist version="1.0"&amp;gt;
&amp;lt;dict&amp;gt;  
    &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;com.linickx.mediatomb&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
    &amp;lt;array&amp;gt; 
        &amp;lt;string&amp;gt;/usr/local/bin/mediatomb&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;-e&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;en0&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;-P&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;/Users/nick/.mediatomb/mediatomb.pid&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;-p&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;49152&amp;lt;/string&amp;gt;
    &amp;lt;/array&amp;gt;
    &amp;lt;key&amp;gt;UserName&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;nick&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;ServiceDescription&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;Run MediaTomb at boot&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
    &amp;lt;true/&amp;gt;
    &amp;lt;key&amp;gt;Nice&amp;lt;/key&amp;gt;
    &amp;lt;integer&amp;gt;20&amp;lt;/integer&amp;gt;
    &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;
    &amp;lt;true/&amp;gt;
    &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;/Users/nick/.mediatomb/error.log&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;/Users/nick/.mediatomb/output.log&amp;lt;/string&amp;gt;
&amp;lt;/dict&amp;gt;
&amp;lt;/plist&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Mon, 18 Mar 2013 07:34:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2013-03-18:os-x-mediatomb-luanchd-plist-file-for-automatic-start-up</guid><category>mac</category><category>mediatomb</category><category>osx</category></item><item><title>OS X: PS 3 Media Server service for start at boot (launchd)</title><link>https://www.linickx.com/os-x-ps-3-media-server-service-for-start-at-boot-launchd</link><description>&lt;p&gt;Given the popularity of the &lt;a href="http://www.ps3mediaserver.org/"&gt;Playstation 3 Media Server
(PSM)&lt;/a&gt; I'm a bit confused to why I
struggled to find a good solution to this...PSM does does not come with
an mac service for running it a boot time, there is a windows service
and some stuff for linux if you google but the best effort I could find
for OS X was &lt;a href="http://www.ps3mediaserver.org/forum/viewtopic.php?f=7&amp;amp;t=3897&amp;amp;p=17251&amp;amp;hilit=background#p17251"&gt;a bodge via
SSH&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;This is my best effort so far, it's not perfect but it's a start.
&lt;strong&gt;Below the more link&lt;/strong&gt;, is a &lt;code&gt;launchd .plist&lt;/code&gt; file which if you place
in &lt;code&gt;/Library/LaunchDaemons/&lt;/code&gt; will start PSM at boot time, &lt;em&gt;well kinda.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The catch is that a user needs to log in, any user will do, the process
will run as the user defined in the &lt;code&gt;.plist&lt;/code&gt; file but since PSM requires
some kind of windowing libraries it simply will not start until a user
logs in!&lt;/p&gt;
&lt;!--more--&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"&amp;gt;
&amp;lt;plist version="1.0"&amp;gt;
&amp;lt;dict&amp;gt;  
    &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;com.linickx.ps3m&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
    &amp;lt;array&amp;gt; 
        &amp;lt;string&amp;gt;/Applications/PS3 Media Server.app/Contents/MacOS/JavaApplicationStub.setenv&amp;lt;/string&amp;gt;
    &amp;lt;/array&amp;gt;
    &amp;lt;key&amp;gt;UserName&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;linickx&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;ServiceDescription&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;Run PS3 Media at boot&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
    &amp;lt;true/&amp;gt;
    &amp;lt;key&amp;gt;Nice&amp;lt;/key&amp;gt;
    &amp;lt;integer&amp;gt;20&amp;lt;/integer&amp;gt;
    &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;
    &amp;lt;true/&amp;gt;
    &amp;lt;key&amp;gt;AbandonProcessGroup&amp;lt;/key&amp;gt;
    &amp;lt;true/&amp;gt;
    &amp;lt;key&amp;gt;WorkingDirectory&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;/Applications/PS3 Media Server.app/Contents/Resources/Java&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;StandardErrorPath&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;/Library/Logs/PSM/rror.log&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;StandardOutPath&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;/Library/Logs/PSM/output.log&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;Java&amp;lt;/key&amp;gt;
        &amp;lt;dict&amp;gt;
            &amp;lt;key&amp;gt;MainClass&amp;lt;/key&amp;gt;
            &amp;lt;string&amp;gt;net.pms.PMS&amp;lt;/string&amp;gt;
            &amp;lt;key&amp;gt;JVMVersion&amp;lt;/key&amp;gt;
            &amp;lt;string&amp;gt;1.6+&amp;lt;/string&amp;gt;
            &amp;lt;key&amp;gt;ClassPath&amp;lt;/key&amp;gt;
            &amp;lt;array&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/net/pms/pms/1.72.0/pms-1.72.0.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/beanshell/bsh-core/2.0b4/bsh-core-2.0b4.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-codec/commons-codec/1.7/commons-codec-1.7.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-configuration/commons-configuration/1.9/commons-configuration-1.9.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-io/commons-io/2.4/commons-io-2.4.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-lang/commons-lang/2.6/commons-lang-2.6.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/h2database/h2/1.3.168/h2-1.3.168.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/ch/qos/logback/logback-classic/1.0.7/logback-classic-1.0.7.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/ch/qos/logback/logback-core/1.0.7/logback-core-1.0.7.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/apache/sanselan/sanselan/0.97-incubator/sanselan-0.97-incubator.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/slf4j/slf4j-api/1.7.1/slf4j-api-1.7.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/slf4j/jcl-over-slf4j/1.7.1/jcl-over-slf4j-1.7.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/hamcrest/hamcrest-integration/1.2.1/hamcrest-integration-1.2.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/hamcrest/hamcrest-library/1.2.1/hamcrest-library-1.2.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/jboss/netty/netty/3.2.7.Final/netty-3.2.7.Final.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/maven/maven-nsis-plugin/2.1/maven-nsis-plugin-2.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/net/java/dev/rome/rome/1.0.0/rome-1.0.0.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/jdom/jdom/1.0/jdom-1.0.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/net/coobird/thumbnailator/0.4.2/thumbnailator-0.4.2.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/jaudiotagger/2.0.3/jaudiotagger-2.0.3.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/jgoodies/common/1.2.1/common-1.2.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/jgoodies/forms/1.4.2/forms-1.4.2.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/jgoodies/looks/2.4.2/looks-2.4.2.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/github/junrar/junrar/0.7/junrar-0.7.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/apache/commons/commons-vfs2/2.0/commons-vfs2-2.0.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/apache/maven/scm/maven-scm-api/1.4/maven-scm-api-1.4.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/apache/maven/scm/maven-scm-provider-svnexe/1.4/maven-scm-provider-svnexe-1.4.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/apache/maven/scm/maven-scm-provider-svn-commons/1.4/maven-scm-provider-svn-commons-1.4.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/regexp/regexp/1.3/regexp-1.3.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/jwbroek/cuelib/cuelib/1.2.1-2008-06-13/cuelib-1.2.1-2008-06-13.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/mediautil/mediautil/1.0/mediautil-1.0.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/googlecode/xmlwise/1.2/xmlwise-1.2.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar&amp;lt;/string&amp;gt;&amp;lt;string&amp;gt;$JAVAROOT/repo/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar&amp;lt;/string&amp;gt;&amp;lt;/array&amp;gt;
            &amp;lt;key&amp;gt;VMOptions&amp;lt;/key&amp;gt;
            &amp;lt;string&amp;gt;-Xmx768M -Xss16M -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -jar&amp;lt;/string&amp;gt;
            &amp;lt;key&amp;gt;WorkingDirectory&amp;lt;/key&amp;gt;
            &amp;lt;string&amp;gt;$APP_PACKAGE/Contents/Resources/Java&amp;lt;/string&amp;gt;
        &amp;lt;/dict&amp;gt;
&amp;lt;/dict&amp;gt;
&amp;lt;/plist&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Sun, 17 Mar 2013 17:18:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2013-03-17:os-x-ps-3-media-server-service-for-start-at-boot-launchd</guid><category>mac</category><category>osx</category><category>Playstation</category><category>psm</category></item><item><title>OS X: Converting videos but keeping the timestamp</title><link>https://www.linickx.com/os-x-converting-videos-but-keeping-the-timestamp</link><description>&lt;p&gt;I got a new computer, w00t! My family like to use the point-and-click
camera for adhoc videos whilst we're out and about, the thing is it's
very old and records in a rubbish AVI format which consumes massive
amounts of disk space, b000!&lt;/p&gt;
&lt;p&gt;After a bit of googling I wrote the below, it'll search through your
disk and find AVI files, check that the file extension is .AVI and then
convert it to .mp4; for bonus points it'll change the timestamp of the
mp4 to match the avi so that it'll import into iPhoto albums nicely.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin.bash
export IFS=$'\n'
for i in $(find ./ -type f -name '*.AVI') 
    do 
        if [ ${i: -4} == ".AVI" ]
            then
            echo "Converting $i"
            ffmpeg -i "$i" -s 480x320 -aspect 4:3 -b 768k -ab 64k -ar 22050 -r 30000/1001 "${i%.AVI}.mp4"
            sleep 5
            TSTAMP=`gls -l --time-style=+%Y%m%d%H%m "$i" | awk '{print $6}'`
            touch -mt $TSTAMP "${i%.AVI}.mp4"
            sleep 5 
            rm -f "$i"
        fi
    done
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Quick Note: &lt;code&gt;gls&lt;/code&gt; is the GNU version of &lt;code&gt;ls&lt;/code&gt; not the built in BSD-MAC
version, you get it via &lt;a href="http://mxcl.github.com/homebrew/"&gt;homebrew&lt;/a&gt;
(&lt;code&gt;brew install coreutils&lt;/code&gt;)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Wed, 06 Mar 2013 18:24:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2013-03-06:os-x-converting-videos-but-keeping-the-timestamp</guid><category>bash</category><category>mac</category><category>osx</category><category>script</category></item><item><title>bash-completion</title><link>https://www.linickx.com/bash-completion</link><description>&lt;p&gt;If like me you can be a little slow at times you need this in your life.&lt;/p&gt;
&lt;p&gt;Centos/Fedora Linux:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
$sudo yum install bash-completion
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;OSX: &lt;a href="https://trac.macports.org/wiki/howto/bash-completion"&gt;https://trac.macports.org/wiki/howto/bash-completion&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Fri, 06 Jul 2012 19:47:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2012-07-06:bash-completion</guid><category>centos</category><category>Fedora</category><category>Linux</category><category>mac</category><category>osx</category></item><item><title>PHP to solve problems</title><link>https://www.linickx.com/php-to-solve-problems</link><description>&lt;p&gt;PHP make you think of web app's right? ... well, did you know you can
run it from the CLI to?&lt;/p&gt;
&lt;p&gt;Recently I've been doing a lot of spreadsheet and sub-netting type
stuff, whilst doing this mundane work I've realised that I can get
scripts to work for me. I've started to post a few &lt;a href="https://gist.github.com/1309388"&gt;PHP network
functions&lt;/a&gt; to github which I've been
using.&lt;/p&gt;
&lt;p&gt;Here's an example: I have a nokia firewall, the routing table in voyager
is shown in the following format -&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Network / CIDR Mask , Gateway
10.0.0.0 / 8 , 10.0.0.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I need that same routing in a Cisco ASA format -&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Network , Mask , Gateway
10.0.0.0, 255.0.0.0, 10.0.0.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now this is not a problem for a few routes but the firewall I'm looking
at now has 177 static routes, which I don't want to convert manually.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Roll in PHP!&lt;/strong&gt;&lt;br /&gt;
Save the original routing table as a .csv file. ColA = ip/mask , ColB =
gateway.&lt;/p&gt;
&lt;p&gt;Save this a route_conv.php&lt;/p&gt;
&lt;p&gt;from your CLI run "&lt;code&gt;php route_conv.php&lt;/code&gt;" and enjoy the output!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Sat, 17 Dec 2011 11:05:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2011-12-17:php-to-solve-problems</guid><category>Linux</category><category>mac</category><category>PHP</category><category>routing</category></item><item><title>port install ipcalc</title><link>https://www.linickx.com/port-install-ipcalc</link><description>&lt;p&gt;&lt;a href="https://www.linickx.com/files/2011/12/ipcalc.png"&gt;&lt;img alt="" src="https://www.linickx.com/files/2011/12/ipcalc.png" title="ipcalc" /&gt;&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Wed, 14 Dec 2011 13:39:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2011-12-14:port-install-ipcalc</guid><category>Blog</category><category>ipcalc</category><category>Linux</category><category>mac</category></item></channel></rss>