Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts

Saturday, August 10, 2013

Setup continuous integration (CI) with Jenkins / Hudson for TestFlight

Steps taken between Nov 12, 2012 and Mar 7, 2013 to finally get it going:
  1. Started with a tutorial.
  2. Then went here to download Jenkins for mac.
  3. I tried 5 builds so far via Jenkins, all resulted in failure, solved a few configuration issues to resolve problems, and now I'm facing an issue that has to do with keychains. Tried to follow this thread to figure out the appropriate action.
  4. Decided to uninstall Jenkins using these instructions
  5. Instead used a new installer that circumvents the keychain access issues.
  6. I let it checkout my project into its workspace once at:
    /Users/pulkitsinghal/.jenkins/jobs/my_project/workspace
    But afterwards I deleted that workspace and soft-linked it with the actual directory which I already have setup for development:
    cd /Users/pulkitsinghal/.jenkins/jobs/my_project
    ln -s ~/dev/my_project/ ./workspace
    And I completely turned off the git checkout process in the Jenkin's job configuration just to be safe ... although I should have been able to get away by simply ignoring submodules too but why checkout when I don't need to.
  7. Then I bumped my head on this:
    fatal error: 'RestKit/RestKit.h' file not found
    #import
    ^
    1 error generated.
  8. It should have already been working based on the directions from the RestKit website: Add the following Header Search Paths (including the quotes):
    "$(BUILT_PRODUCTS_DIR)/../../Headers"
    But I suppose for some reason that meant one thing to Xcode and something entirely different to jenkins-xcode-plugin. So through trial and error and watching the logs, I figured out that I needed to add:
    "$(BUILT_PRODUCTS_DIR)/../my_project/Build/Headers
    in order for jenkins-xcode-plugin to pick it up and work with it properly.
  9. Ran into another road-block ... posted question to stackoverflow.
  10. Then got stuck due to this issue.

Monday, April 29, 2013

Mac tools and tips

This list will surely grow:

  • TextWrangler
    • Useful for comparing folders on mac via its "Search > Find Differences..." menu option.

Saturday, April 27, 2013

Why do most desktop blog editors suck?

  • First, what are they truly good for:
    • You won't lose your content due to keyboard muscle-memory which differs between windows and mac users or because of hotkey mappings which often differ between browsers like Firefox and Safari. What am I talking about?
      • I'm talking about the tears I've shed when I tried to undo my last change via (ctrl+z or cmd+z) inside blogger/blogspot's web editor and it blew away ALL of my content! Was it safari, firefox, mac or windows conflicting key mappings that caused this? I don't know ... but its an evil concoction that I don't care for.
    • Worst of all is the mapping for the backspace key. It move you back to the previous page in your browser when you are editing your blog instead of simply deleting a character ... thus causing you to lose all your work!
    • Just having the comfort of knowing that your content won't be lost because of a dumb keystroke ... is just about the only thing that these desktop blog editors are good for.
  • Onwards & upwards ... lets look at all the reasons desktop blog editor SUCK ... which pretty much boils down to the fact that you still have to manually edit HTML because the simplest usecases aren't automatically handled. What are these usecases? Images and embeds!
    • Is it really that hard for the desktop-blog-editor manufacturing industry (yes that is sarcasm) to grasp the fact that folks might want their images to float to the right or left and their content/text to simply flow around them? There's not a single tool that handles this via a WYSIWYG toolbar.
    • Embeds mean different things to different people. For a developer, it means embedding code-blocks (gists for example) which will have their own space and your own content would flow around and not clash/overlap with them.
    • Seriously, the desktop blog editors out there today (year 2013) are just a big disappointment :(

Thursday, August 30, 2012

Tuesday, August 14, 2012

Replacing X11 with XQuartz on Mountain Lion

  1. It is a bit of a surprise to realize that X11 is missing from your system after an upgrade to Mountain Lion. Apple does a good job of pointing the user to XQuartz but something critical is lacking!
  2. Apparently the installation (X11 2.7.2 - 2012.06.01 - First release supported on Mountain Lion) needs to be run twice in order for it to be successful.
  3. The first time it asks for a system restart after which the programs which are supposed to pick-up on and start using it are still asking dumb question like "Where is X11?"
  4. If you run the installation a second time though, it will now place an app called XQuartz in your system and you can launch it from Spotlight.
  5. Afterwards, you are no longer asked the question: "Where is X11?" ... the dependent applications simply work :)

Tuesday, April 24, 2012

Securing ElasticSearch for direct access via a Jetty plugin

  1. The elasticsearch-jetty plugin can be used to secure an ES instance for direct access.
  2. If the first wall you hit, happens to be a "gap" in Jetty know-how then refer to the following to get up to speed:
  3. Next, you may struggle with your wish for Jetty to be super-secure vs. how to make it happen:
  4. Getting a CA-signed cert is always such a pain so if you can re-purpose an existing one ... great!
    • Need to perform some transformations on the available keys & certs? You may refer to http://www.sslshopper.com/article-most-common-openssl-commands.html ... I found the following instructions provided there to be particularly useful:
      Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
      openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes
      You can add -nocerts to only output the private key or add -nokeys to only output the certificates.
    • Using Portecle (wrapped with Jar Bundler) or KeyStore Explorer works well too.

Wednesday, March 21, 2012

Bamboo Pen Tablet + Mac + InkScape

  • First of all this video made all the difference in the world in terms of getting the bamboo tablet device to do what I wanted it to do once I to understand the pen (absolute) mode versus the mouse mode.

Saturday, November 12, 2011

FAIL: Installing Simon Listens on Mac

  1. Mac OS X 10.6.8 on MacBook Pro with an Intel Core
  2. Download and unzip Simon Listens, then:
  3. cd simon-0.3.0
    ./build.sh
    
  4. You will run into errors like kde and cmake are missing.
  5. Instructions for installing KDE on a mac (cmake is included) are available here.
  6. I chose to perform the MacPorts based installation. The following command takes a long time to run.
    sudo port -v install kdesdk4
    
    I waited an hour before I simply decided to leave the MacBook running overnight. So I don't know the total time it ended up taking.
  7. I was warned that macports in general is a bit out of date, so I decided to update that too.
    sudo port selfupdate
    
  8. I was also warned that some of the existing Macports installs may be outdated, so I fixed that as well. Though I wonder if this is what caused the overall experiment to fail in the end?
    sudo port upgrade outdated
    
  9. I decided to run some extra/redundant commands in order to make sure that the kdesdk4 really did install its counterparts:
    sudo port -v install cmake
    sudo port -v install qt4-mac
    sudo port -v install kdelibs4
    
    All of them were already installed so I was satisfied with the sanity test.
  10. I pasted whatever I was instructed to:
    cd ~
    mkdir bin
    vi bin/findup
    
  11. I decided to append-to/edit the .bash_profile instead of creating .profile file. And once again I pasted whatever I was told to:
    chmod 777 bin/findup
    vi .bash_profile
    
  12. Performed all the steps leading up to the checkout as instructed but did the checkout over a non-SSL (cleartext) channel:
    mkdir -p ~/Desktop/kde/build
    mkdir -p ~/Desktop/kde/home
    mkdir -p ~/Desktop/kde/inst
    mkdir -p ~/Desktop/kde/src
    mkdir -p ~/Desktop/kde/src/branches
    mkdir -p ~/Desktop/kde/src/trunk
    vi ~/kde/src/trunk/.my-setup
    cd ~/kde/src/trunk/
    env
    svn co svn://svn.kde.org/home/kde/trunk/kdesupport
    
  13. Performed the actual build and created a directory that didn't exist but I had put-off creating because I thought perhaps the KDE build/installation process would create it:
    cd kdesupport
    cmakekde
    sudo chown -R $USER ~/Library/Preferences/KDE
    mkdir ~/Library/Preferences/KDE
    sudo chown -R $USER ~/Library/Preferences/KDE/
    sudo launchctl load  -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
    launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
    
  14. This time the build for Simon Listens went much further but ultimately it failed!
    cd simon-0.3.0
    ./build.sh
    
  15. I lost the link but somewhere on the web it was suggested that the errors I saw in the build will happen when binary files have been built for a 32-bit on a 64-bit system! And the way to get around it was by passing some arguments to let Simon's build script skip this stuff. But I found way too many configure files and couldn't make heads or tails of which one to use and how to tell it do what I need to workaound the problem.
    find ./ -name configure
    <6-7 results all in different nested directories>
    
    cd simon-0.3.0
    grep "enable-charconv" julius/julius/*
    vi julius/julius/configure
    ./build.sh --enable-charconv=no
    vi julius/julius/configure.in 
    ./build.sh 
    
  16. The build error seemed to have the word iconv mentioned in a bunch of places so I decided to figure out which MacPorts install was part of the problem and remove them:
    port list | grep iconv
    sudo port uninstall libiconv @1.14_0
    sudo port uninstall libiconv @1.14_0+universal
    
    But then the one being used (libiconv @1.14_0+universal) couldn't actually be removed because there were dependencies present!
  17. I also found out that that Mac actually ships with a 64-bit flavor of libiconv by default and I was able to locate the said files on my system:
    find /usr/lib -name libiconv*
    /usr/lib/libiconv.2.4.0.dylib
    /usr/lib/libiconv.2.dylib
    /usr/lib/libiconv.dylib
    
  18. Found some clues on how to try out the Mac's system libiconv library as a fallback without uninstalling MacPorts' version of the lib ... but that too didn't help the Simon build work because now the Mac's system libiconv couldn't agree on version #s with some of the other MacPorts based libs ... so I reverted that trial change as well:
    mkdir ~/temp
    sudo mv /opt/local/lib/lib
    sudo mv /opt/local/lib/libiconv* ~/temp/
    ./build.sh 
    sudo mv ~/temp/libiconv* /opt/local/lib/
    
  19. Finally I decided to remove all the clutter that had been placed on my system during this FAIL-ed attempt to the best of my abilities:
    sudo port uninstall kdesdk4 @4.7.3_0
    sudo port uninstall cmake
    sudo port uninstall --follow-dependents qt4-mac
    sudo port uninstall --follow-dependents kdelibs4
    cd ~
    rm -rf kde/
    rm -rf ~/Library/Preferences/KDE
    vi /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
    launchctl list
    launchctl list | grep dbus
    launchctl remove org.freedesktop.dbus-session
    launchctl list | grep dbus
    cd ~
    rm -rf bin/
    vi .bash_profile
    

Wednesday, November 2, 2011

Image Editing Toolset for Mac

All of the following are free and available on the Mac:
  • Grab - Awesome tool for taking snapshots of on screen material.
  • iPhoto - Decent~ish for cropping.
  • Preview - Pretty good for cropping. You can follow the instructions given here. Hint: Select what should remain then press "cmd+k" to crop out the rest.
  • Gimp

Sunday, October 2, 2011

Screencast Toolset

Best toolset that I've found for working on the Mac with screencasts:
  1. ScreenR
  2. for recording.
  3. Jing for recording.
  4. SimpleMovieX for merging.
    1. The videos merged using this tool will not work as intended on Vimeo or YouTube. They will stop at the very first location that was stitched together.
  5. Final Cut Pro for merging.
    1. The videos merged using this tool can be seamlessly uploaded to top providers like YouTube and everything in the video works as intended. But the content may show up as Public by default! So make sure to secure your content afterwards.

Tuesday, May 24, 2011

Inkscape - Some discoveries are only made on mac

For those who leave the comfortable realm of Windows behind and enter the rather strange and initially maddening world of the Mac, the only thing that can possibly hit harder than not being able to use the keys and shortcuts like before, has to be the glaring lack of some MSPaint like utility.

Well, you may quickly find solace by going out and downloading either Gimp or Inkscape.

My personal vote would lean heavily towards Inkspace because of the abundance of excellent resources and tutorials when it comes to getting started with this tool:
  1. inkscape-class-day-1
  2. inkscape-class-day-2
  3. inkscape-class-day-3
  4. inkscape-class-day-4
A lot of screencasts are available as well.

Afterwards to get your creativity flowing use the following two awesome tutorials to create some mac/iPhone icons of your own:

Sunday, March 6, 2011

Wish List: Integrate openssl and/or keytool funtionality into Windows Right-Click context menu

Techies have it real good. So much that we need is already out there in the world and to top it all off there's Google so that we may find what we need! Yet, sometimes I come across problems that make me wonder: "Do we really have it all?"

I have had my fair share of banging my head bloody against the computer screen ... trying to re-learn keytool & openssl syntax, again! It takes 1 month to remind myself of all the caveats and for another month I enjoy expert status. Then the vicious cycle begins again where I don't need to use them and the 10 month hibernation strips away my facilities from me. That's my year right there .... happy new year? I think not!

So what's on my wish list?
  1. Establish a 3 letter extension syntax to honor what's what for public/private keypair based security. It is far too loose today and makes the creation of tooling more challenging than it needs to be.
    1. Public/Private Keypairs: should at least end with pem or der
      • filename.pem
      • filename.der
    2. Certificate Signing Requests: should end with csr
      • filename.csr
    3. Keystores should clearly define their own format
      • filename.jks
  2. Tools or widgets or plugins ... something should be available which makes life easier by allowing the user to right-click a file and take any valid action supported by openssl or keytool.
I don't want to make it seem like "the sky is falling" ... to be fair, it is not like the security space is completely without tooling. Some decent solutions exist that make key and certificate management simpler:
  1. Portecle: is a user friendly GUI application for creating, managing and examining key stores, keys, certificates, certificate requests, certificate revocation lists and more.
    • Wrapping Portecle with Jar Bundler works well for mac. And if you need to run it as root, you can use "sudo open portecle.app" to launch it.
  2. KeyStore Explorer: is a free GUI replacement for the Java command-line utilities keytool, jarsigner and jadtool. KeyStore Explorer presents their functionality, and more, via an intuitive graphical user interface