Reboot: Starting up

Continuous Life Integration

0 notes &

Chrome, yeoman.io, ajax, and disabling web security

Stashing this here in case anyone else needs it.

open /Applications/Google\ Chrome\ Canary.app --args --disable-web-security

Doing some site development with yeoman but I need to load Ajax from another domain. Yeoman’s built-in server is growing in maturity and flexibility but a PHP proxy isn’t possible right now (php support may come in 1.0+). Before digging too deeply I saw you can disable the web security to allow the requests. Nice.

(Source: documentumcookbook.wordpress.com)

Filed under dev ajax yeoman.io

0 notes &

lftp and checking for the existence of a remote file

lftp is a handy little FTP command line. Easy to install on Linux servers. Works a treat. It has a find command but one client is set up that you can’t do any directory listings. Fortunately with lftp you can just do

get -a /path/to/file || exit

If the file doesn’t exist, it’ll exit. As noted here you can give it an exit status and check it in the shell running the script after execution. Nice.

0 notes &

Searched for an Excel pivot table replacement. Found so much more…

Finding Pandas

I do work for a number of organizations. I track time for all of these organizations and then submit to the various groups. Each has a different take on what they need but I previously used On The Job from Stunt Software. It’s really a nice app. It’s got time tracking, invoicing, payment tracking and some other goodies. But it wasn’t flexible enough.

One company required some serious slicing and dicing of the data and I couldn’t quickly and reliably get that out of OTJ. I even resorted to SQL queries direct on the sqlite data store. It was a bit… brittle. Knowing what was coming I needed a quick way to get future time tracked and worry about querying it later.

Enter the Minco time tracker. It has its quirks but good things are planned. (The dev is quite responsive and very helpful!) So I started throwing my data in as quick as I could. I tried the default ways of getting access to the data but in the end I came up with a nice SQL query to pull date direct from the sqlite database as needed. I use tagging for clients, projects, and YouTrack issues and I could grab things with my query. But I couldn’t mangle the data easily. Ease is the key here.

So I searched. And searched. PHP. Nope not what I was looking for. Ruby. Close but no cigar. Python. Hmm… still not quite. Yeah, I saw pivottable but it didn’t fit the way I hoped. pyvttbl was really close, too. Usually when I am looking for something like this I am looking for something that will help me beyond my initial problem. So I gave up for a while. Too busy. (Which is why I haven’t posted or tweeted. Still too busy but just gotta share this anyway.)

I really needed to get programmatic access to that data though and I need to start doing time reports again to catch up on all the admin. What to do?! I searched again. For some reason, this time, I started noticing references to pandas and pivot tables. Thought it was worth a look.

I’m sold. This is a game changer for me.

But wait, there’s more!

Checking out PyCon 2012 videos for pandas on Lanyrd. Oh man. Now I already really dig IPython but there I learned about IPython Notebook.

Oh man. Can it be?! A double game changer!

REPLs in general are great. Pry is my favorite for Ruby. iPython itself was my favorite for Python. But this is just too much! So I’ll be slicing, dicing, and rearranging all kinds of data. Ad-hoc data munging returns! Pandas and the IPython Notebook adds so many more batteries to Python’s already broad suite of included batteries that throwing data in and out is ridiculously easy, even compared to Python’s already ease of use for file handling. This and the fact that I can also use sqlsoup for other data munging is just the bees knees.

Filed under python ipython pandas

0 notes &

Quickest way from PSD to iOS?

The Photoshop Script FERRYScript will convert your PSD file into usable PNG files to be used in your application and will then create an XML file with the layers’ information.

The programming library FERRYDocker will read the XML file and import the PNGs to reconstruct your PSD design, converting them into interactive elements if specified. For example, if one of your design layers is called “but_mylayer_off”, and another layer “but_mylayer_on”, FERRYDocker will create a button using those images as normal and highlight states.

If you just want your PSD to be ‘chopped’ into PNGs, run the script and let it do it for you. The script will rasterize vector objects, apply effects, apply masks and trim the PNGs for you.

Pretty easy, right?

Filed under photoshop automation ios

1 note &

Backbone is an easy starting point, but provides only basic, low-level patterns. Especially, Backbone provides little to structure an actual application. For example, the famous “Todo list example” is not an application in the strict sense nor does it teach best practices how to structure Backbone code. In addition, we could not use many of Backbone’s features on moviepilot.com and were forced to re-implement others. For us, Backbone got usable by deriving, extending or even replacing its classes. To be fair, Backbone doesn’t intend to be an all-round framework so it wouldn’t be appropriate to blame Backbone for this deliberate limitations. Nonetheless, most Backbone use cases clearly need a sophisticated application architecture.
https://github.com/chaplinjs/chaplin#conclusions

Filed under backbonejs dev

0 notes &

Setting up Intellij for Ruby

The short version is up first. Caveat emptor: I’m new to IntelliJ and Ruby. :)

  • Install IntelliJ
  • Install Ruby plugin
  • If .rb files are not recognized, associate *.rb files with Ruby:
    Settings > File Types > in the list find Ruby Files > click “+” > type “*.rb” > click OK
  • Create a project with a Ruby module
  • Init the bundler:
    Tools > Bundler > Init
    This creates the gemspec

Once that’s in you can add gems to your gemspec file which can be installed in at least two different ways depending on your workflow

I really dig Intellij IDEA. My IDE path is something like this:

  • FlashDevelop for AS2
  • FlashDevelop for early MXML because I could run MTASC with it (if I recall correctly)
  • FlexBuilder 2 when I did my first real Flash development with AS3 and MXML
  • Eclipse with PyDev (when it was free, then when it was paid, then when it was folded into Aptana)
  • Eclipse with PHP (various versions)
  • Netbeans with PHP
  • Stumbled upon PHPStorm. All kids of wow. Got hooked on Jetbrains stuff.
  • Was going to get RubyMine and decided to go with IntelliJ IDEA during their recent sale.

There was one thing. When I got IntelliJ, I didn’t have the Ruby plugin installed and activated at first launch. It didn’t recognize .rb files because of it. I was a bit shocked at first. The fix of course is easy. Activate Ruby, and associate the *.rb files with Ruby.

But IntelliJ does one more thing. Your development environment is pretty much completely configuranble. I already had RVM installed and after creating a new project with a ruby module in it, it picked up on the various settings. Except the gems.

For that I had to init bundler for the project which created a new gemspec file. Add the requisite ‘gem “some-cool-gem”’, and it alerted me that the gem was missing in the environment. It’s extra steps but it makes it possible to develop with specific configs and gem sets. Installing the gems is easy because if’ll say “Missing gems detected, install with the gem manager” (paraphrased) which is just a shortcut away. Alt+Enter for quick fix triggers the installation and we’re off to the races.

I like digging around through code, refactoring, learning, debugging, and generally exploring. I am enjoying my first steps in Ruby as well.

Filed under ruby intellij tip learning

1 note &

Byword to Tumblr with Markdown

I’ll have to do a writeup on this in the near future. Nothing major, just a simple how-to. I was trying to use tumblr-rb:

tumblr-rb | RubyGems.org | your community gem host

but there are build issues with that so I wasn’t able to get that running. When that is settled it will simplify things as it includes handling YAML frontmatter itself and a few other things. It has good documentation and examples as well.

There is an effort to get it updated and running with current ruby gem sets but that may be a while. However combining a bit of Applescript to get the front-most active document in process wrapped up in Ruby with some neat gems I have been able to get it going. And it’s neat.

  1. Byword for writing
  2. Marked for the live preview as I write
  3. ralph/document_mapper on GitHub for YAML front matter
  4. Alfred App to make it all almost automatic
  5. tumblr4r to get it talking with Tumblr

And I actually post the markdown code instead of HTML so I am just pulling the text straight Markdown from Byword.

I’d like to use OAuth and some other goodies but it’s got me going now. I’d also like to post it to my twitter feed but that’s for the future. I’m happy with how it came together as I am learning more desktop automation. This ome combined a number of the kinds of techniques I want to be able to use to smooth out my digital life.

Filed under cool byword markdown automation

0 notes &

Byword List Tip - renumbering

I am a new fan of Byword. It’s like a lightweight Markdown IDE. One thing: once you number a list and then use the shortcuts to rearrange the order, the numbering doesn’t update. That’s something @intellijidea would do. :) The workaround is simple though.

  1. Make your list
  2. Convert the list (command + shift+ L)
  3. Rearrange it
  4. Convert it again

Note: you don’t need to select your list, just be in the list.

[edit] Reading through the markdown syntax, I see that the order of the numbers is irrelevant. So this little nicety is just to reduce your own cognitive load working with lists. :)

Link: Byword • A Simple Text Editor for Mac and iOS

Filed under byword tip

0 notes &

Twitter ruby tools

For using twitter from ruby:

https://github.com/jnunemaker/twitter
https://github.com/sferik/t
https://github.com/twitter/twitter-text-rb

“t” was pulled from the twitter codebase as purely a commandline driven tool. Looks quite neat as well.

That last one came up in a roundabout way. I had already made a really simple generator for OS X combined with @alfredapp to make twitter usernames into twitter links. That lib has an extraction and auto-link function as well. Nice.

Filed under ruby twitter dev

0 notes &

Stuff I Use: @xmind

Link

XMind - Mind Mapping and Storming

Why

Yes the core app is free but that’s not the main reason. The thing I actually appreciate most is the fast keyboard based entry of mind maps.

I use it for flowcharts often, though they aren’t “correct” flow charts. I use the “Org Down” type to do yes/no and if/then stuff. It’s very quick to throw together and think through, etc. I use hyper links to “refactor” my charts and floating topics for things that are almost like methods in programming that are linked in multiple places.

So far it’s the fastest and most straightforward way to do it for me. And neat. @qcoding asked me why I can’t draw circles and arrows on a whiteboard.

  1. My writing is worse than chicken scratch
  2. I can’t “refactor” a drawing so easily
  3. “Refactoring” whole groups with drag and drop is very helpful
  4. It’s also why I don’t use stickies on a board for stuff…

Filed under stuffiuse app mindmap