August 22nd, 2011

Simple HTTP Server

Filed under: geek,mac,webdev — saul @ 5:22 PM

I’ve been writing tons of Ajaxy goodness lately, lots of concurrent projects each in a different folder, a different drive - and honestly I’m just too lazy to stop and start MAMP or Web Sharing, really I’m that lazy, so I thought it would be pretty handy a AlfredApp extension that would make running a HTTP server from any directory an simple as a keypress.

Usage: Evoke Alfred, Choose a folder, choose the action, Safari will/should open to ‘localhost:8080’ with your directory as the root, if your directory has a index (html/htm) file that should run.

Simple HTTP Server with AlfredApp

 

August 2nd, 2011

Quick Alfred Extensions

Filed under: daily,geek,mac — saul @ 9:40 AM

So Alfred 0.9.9 was recently released, it’s awesome - and it get’s better with every release. One of the new features is that it supports extensions (applescripts, shell scripts, automator actions, specific file references and search filters) here’s 2 that I knocked together rather quickly.

  • Hide / Show Desktop: this shows and hides the files that may be on your desktop, handy for those times when you need to focus - it does it’s mojo by setting a finder flag on and off, your files are uneffected
  • Ignore this file with Alfred: this extension is most useful via the files actions interface - I use it to clean up my Alfred search results - search a file, select some of the extraneous result that occassionally happen select this action and those unwanted results shouldn’t include the acted upon file next time.

Stop back to this post from time to time, as I’ll certainly be writing a few more of these

 

May 18th, 2011

Texting & Tasking with Alfred

Filed under: geek,mac — saul @ 5:56 PM

Alfred 350x206 Texting & Tasking with AlfredI’m ashamed at how many task management scenarios I’ve explored, you name it I’ve used it - the three constants throughout my arduous journey have been TaskPaper, Notational Velocity & Dropbox - as I’m so fond of saying, “it’s not pretty but it works” One element that’s been missing is a quick low-fat way to drop items into my text files to deal with later, I’m not fond of keeping TP or NV running all the time, as I find a task list in my face distracting and somewhat (strangely) intimidating.

Last week the awesome folks at Alfred (@alfredApp) released 0.9 of Alfred, my launcher of choice - and via my PowerPack license I can run shell scripts, global commands and other assorted tasty tidbits. Today I had a few minutes, so I knocked together a quick append to text file function so I can add my tasks to my list while ‘in the moment’

echo "{query}" >> /Users/you-username-goes-here/path/text-file-name.txt

as easy as that.. more soon.. stay tuned

UPDATE

Some people may want to prepend as opposed to append, this seems to work.

echo "{query}" | cat - /Users/you-username-goes-here/path/text-file-name.txt > /tmp/tempfile && mv /tmp/tempfile /Users/you-username-goes-here/path/text-file-name.txt

Another Update

now packaged as an extension here

 

April 4th, 2011

Loving inkPad on my iPad

Filed under: daily,illustration,iPad,mac — saul @ 9:21 AM

iPadinkPad Loving inkPad on my iPad
trudi Loving inkPad on my iPad
dude Loving inkPad on my iPad
Lately I’ve been really enjoying drawing on my iPad, Last week I bought inkPad, really nice - the developers are obviously AI users,  they’ve boiled AI functionality down to the drawing part (which IMHO is what Adobe should have done when they released InDesign) anyway really decent app, drop export, multiple formats (most notably svg,png,pdf), dropbox support. But the best thing about it is the pen tool - took me less than 5 seconds to wrap my head around the subtleties of drawing corner and curved points with my finger tips. All the spots above are 100% straight from inkPad, although I could easily edit them in AI if I needed too. I haven’t used inkPad for any client work yet, but that’s only a matter of time. Anyhow check it out, it’s 5 bucks.

inkPad

 

July 13th, 2010

More iTunes Remote Fun

Filed under: daily,geek,mac — saul @ 8:13 AM

Search your remote Library and create a playlist based on your search - and of course play your playlist, knowledge gleaned from Doug and Rory

-- you'll want to set this line to reflect your remote machine info
set remoteMachine to "eppc://username:password@machinename.local"
set keyword to "Gogol Bordello"
display dialog "Search:" default answer keyword
set vol to text returned of the result
using terms from application "iTunes"
	tell application "iTunes" of machine remoteMachine
		set my_search_results to (search library playlist 1 for keyword)
		if my_search_results is not {} then
			set myList to make new playlist with properties {name:keyword}
			set sel to a reference to my_search_results
			repeat with aTrack in sel
				set thisTrack to (get location of aTrack)
				set dbid to (get database ID of aTrack)
				add thisTrack to myList
			end repeat
			set currentList to playlist keyword
			play the playlist named keyword
			reveal current track
		end if
	end tell
end using terms from

Two obvious TODO’s in my code - it doesn’t do muchANY error checking so although iTunes does seemed to care if you have multiple playlists sharing a name (meaning it doesn’t overwrite them) THAT might not be what you’re intention. I’ll probably be fixing that at a later date. Lastly it doesn’t offer any feedback - which I suppose is fine, but not very me so I’ll probably add some GROWL notification in regards to if the playlist was created and how many tracks were added.

Again really just scratching the surface here, and Doug & Rory did all the heavy lifting on this one.

 

July 12th, 2010

Alfred, To The Bat Cave…

Filed under: daily,geek,mac — saul @ 7:10 AM

alfred Alfred, To The Bat Cave...I’ve blogged about Alfred once before, it’s a great little launcher - the fact that it uses Spotlight comments to tag/exclude/group apps and files for launching is IMHO it’s killer feature - being able to group all your tools AND files/documents together makes Alfred a awesome workflow tool, but I’m not here to talk about work, well not exactly - take a look at the pic at the top of this post - 6 small apps (whose code I gleaned from here), each app controls playback and volume of my Jukebox G4 Laptop, all linked together with the spotlight keyword ‘JUKE’ those combined with GROWL makes for a really powerful combination, I can control every aspect of playback of the jukebox - and get feedback as to what’s currently playing without ever taking my hands off the keyboard. I wasn’t able to find that exact Functionality anywhere else, and because I run Alfred and Growl anyway there’s ZERO OVERHEAD.

This only really scratches the surface of what’s doable, so stayed tuned. At some point in the future I’m sure Alfred will allow us to pass arguments to scripts (ala Launchbar) at that point I’ll write scripts that Spotlight tags selected files into Alfred groups, and the universe will recursively collapse upon itself.

(Icons by David Lanham)

 

April 7th, 2010

The beauty of simplicity

Filed under: daily,geek,mac,webdev — saul @ 7:44 AM

Picture 1 The beauty of simplicityRecently I switched my launcher of choice to ‘Alfred’ a nifty indie project that I became aware of via Twitter, in the past I’ve been both a Quicksilver and LaunchBar user - both extremely powerful apps that although I used them religiously, each had quirks I never could really get past (QS had stability issues, LB was stable but I never wrapped my head around it’s particular method of bringing back results, and it wasn’t going to win any beauty pageants)

Alfred is in beta, but seems stable, visually pretty, and actively developed (which I really appreciate) - And has most of the features you’d want in a launcher - but I want to talk about a single feature, that I really like, Alfred’s use of spotlight comments allows you to create groups of essentially unrelated apps, it’s so simple, so obvious (and honestly it may have worked with LaunchBar too, but I never checked) just add your desired key work to all the apps you want in a group and BOOM! done - I add ‘webd’ to Transmit, Coda, Textmate, Cssedit and Espresso and evoke Alfred and it just works, you can assign as many keywords to an app as you want, for example I add ‘ftp’ to transmit as well.

It’s a simple feature I really appreciate, and we all know how hard simple actually is. So if you’re in the market for a nifty, pretty, deceptively powerful launcher that’s only going to get better - take a look at Alfred.

 

February 4th, 2010

CodeEquivalenceDatabase

Filed under: geek,mac — saul @ 6:55 AM

For the past 6 months I’ve had this interesting mac issue - once or twice a month my internal drive which generally has about 90GB free on it would drop to 25GB free or less, I originally thought perhaps the drive was dying because rebooting off a system dvd and repairing the drive generally fixed it - about a week ago - that fix stopped working, and I thought hmm.. maybe something just isn’t cleaning up after itself - since we’re talking about 65GB I immediately thought it must be iPhoto/Photoshop/Illustrator/Fireworks since it’s pretty unlikely coda/textmate/expresso (and YES I use all three) ever use that much of anything - so I dug deeper, I have a demo of DaisyDisk hanging around that showed me my ‘CodeEquivalenceDatabase’ (which lives in: var/db) file was 64GB - it didn’t take a rocket scientist to figure out that it was likely that file was the problem - but I wasn’t sure, maybe that file was supposed to be that big - some more googling and that file is tied directly to 1password and keychain - I ran repair ‘keychain’ BOOM crashed/reboot/won’t restart/lovely - reboot again and it came back - some more googling led me to believe I could just delete ‘CodeEquivalenceDatabase’ and it would be regenerated, so I did - and it was, the new file was 16k UNTIL I launched Transmit, it seems that every time I launch Transmit the file doubles in size - I suppose that might shed some light on how often I launch Transmit (I’d love for someone to do that math).

Conclusion

I deleted Transmit and reinstalled, and the problem seems to have gone away, it’s important to mention that it’s highly unlikely this was a Transmit problem, it more likely that it was just a very ugly anomaly on my machine, I haven’t experienced anything like this on any other system.

 

October 16th, 2007

The Raw Power Of Launchbar + Shell

Filed under: geek,mac — saul @ 9:41 AM

So I’ve been twitting for a short time, Like so many people I downloaded ‘Twittererific’ and have been happily twitting away - it’s a solid sexy little app, and honestly I would expect nothing less from the guys at iconfactory, they rock, and rock hard. Given my recent love affair with the shell, I realized last night that I could easily leverage Launchbar to be my twitting tool of choice; twitters API is simple and concise.

curl --basic --user "USERNAME:PASSWORD" --data-ascii ¬
"status=YOUR DESIRED TWIT" " ¬
http://twitter.com/statuses/update.json"

So to tie that to Launchbar we simply add the argument passed (your typed status) from launchbar into the script, save it in ‘\bin’ CHMOD it executable, and bind it to a search template

curl --basic --user "USERNAME:PASSWORD" --data-ascii ¬
"status=$1" "http://twitter.com/statuses/update.json"

That’s all it really takes to post, how simple is that?, of course to get your friends status it’ll take a bit more, I’m thinking ‘geektool’ is the right tool for that job, but that’s a different post (hopefully tomorrow).

Tagged: , ,

 

October 12th, 2007

GTD via Shell by way of LaunchBar

Filed under: geek,mac — saul @ 10:46 AM

I’m forever fiddling with online ‘organizers’ one of the nicest IMHO is Backpack by those 37 signals guys, it’s clean and straightforward - and while I doubt I’ll ever actually use it for my day-to-day masterlist, it’s an excellent place to jot down some quick notes - till I can transcribe them into the ‘uber’ paper list that rules my waking hours (yes..paper, I confess, I kill trees, regularly)

So my recent insomnia had me poking at the BackPack API - to see if I could easily marry BackPack to Launchbar which is my preferred launcher du-jour (whole other post needed as to my choosing it over QS) Natively launchbar supports applescript (which I hate writing), and it also supports Shell scripts (which I love writing) so that choice was simple.

BackPack’s API uses XML over HTTP - which I found annoying (which means I couldn’t get it to work) but Backpack also has a email interface - which is cake. I create a shell script named ‘createTODO’ and parked it in my bin directory. I CHMOD’d it executable.

#!/bin/bash

E="address@yourpage.backpackit.com"
S="Subject: todo: $1"
echo $S | sendmail -f youremail@domain.com $A

that’s the nuts and bolts of it really. it’s clean, simple, bulletproof - you don’t even need to worry about your API key, tested with some static content, boooyah! step one done.

Now to connect that to LB it’s so easy it’s sick..
Open your LB Configuration and create a new search template, give it a simple to type name (like TD)
and make the detail is (Note the linebreak ¬)

x-launchbar:execute? ¬
path=/bin/createTODO&arguments="*"

Using it is as easy as;
Trigger LB, type ‘TD’ hit space. type your task/note and hit enter DONE!

I created a similar script and template for Backpack notes, I’m pretty sure you can figure that one out. Maybe the next version will use applescript and have Growl feedback… hmm.

 
Next Page »