Tag Archives: osx

Force application windows to a certain position when the application is launched in OS X

Many applications seem to launch in appropriate positions but I wish that some (like Chrome and Firefox) would always launch on the left half of the screen, while I would like others like SublimeText to launch on the right side of the screen. I have checked the application settings and can’t find a way to do this. I’ve explored several window managers and am able to move the windows into position after they launch with a keyboard shortcut – but I would like them to launch in pre-determined positions. How can I force application windows to a certain position when the application is launched in OS X? After much searching I didn’t find a specific answer. However I did start using Slate for Mac OS X which is a very advanced, free, and open-source window manager. It has a .slate config file that is in the home directory. There is a issue requesting command line support and I really hope that gets implemented soon – that would solve my issue of easily positioning windows programmatically. If that doesn’t help, I also found a great question on the Apple Stack Exchange listing the best window managers for OS X.

Posted in Mac, Software, Tech Tips | Tagged , , | Leave a comment

MoreInternet Preference Pane

MoreInternet Preference Pane is an application / preference pane that allows you to set up custom protocol / schema handlers in Mac OS X. The MoreInternet Preference Pane modifies the settings inside this file: ~/Library/Preferences/com.apple.launchServices.plist This is a screenshot of what it looks like: It was previously available at monkeyfood.com, but since it is no longer available there you can download MoreInternet Preference Pane at this link: http://download.cnet.com/More-Internet/3000-2094_4-10559064.html

Posted in Mac, Software, Tech Tips | Tagged , , | Leave a comment

Send Folders to CodeKit via the Command Line

If you’re doing some web development with CodeKit and want to be able to send folders to the program via the command line (I was really hoping to do this via Quicksilver), then you can use this little tidbit: open -a /Applications/CodeKit.app “/path/to/your/project” The CodeKit application apparently does not associate itself with being able to open files and so it doesn’t register with folders or files as being an available “Open With” application for opening them. Again I was hoping to do this via a quicksilver action, something like: If it did then quicksilver would stick it in the third pane when using the “Open With” action, wouldn’t that be nice! It is possible to get it into the third pane but you need to have the path to the application in your clipboard (/Applications/CodeKit.app) and then: Select the Folder Choose “Open With” Tab to the third pane and paste the path to the application in. That’s demonstrated in the screenshot above. CodeKit’s not too bad, some aspects seem sluggish and I wish there were more features to customize it – like inclusion and exclusion rules and a finer grained control of which tabs refresh in the browser – also maybe some explanation of their partial CSS injection-on-update feature they have in the preferences.

Posted in Mac, Tech Tips, Web Development | Tagged , , , , | Leave a comment

Trello Icon – PNG & ICNS

In 2011 Max Masnick posted an icon for Trello, and shortly thereafter @innovati provided an updated icon and a photoshop template. I’ve taken a stab at the Trello Icon based on @innovati’s work and below is the result. Just like Max, I was interested in using Trello as a Fluid App on Mac OS X and needed a nice ICNS for the Application. The file can be downloaded as an ICNS as well. The second file can be downloaded as an ICNS as well. Thanks to Max and his post for the sources I needed to create this.

Posted in Design, Mac, Marketing, Tech Tips | Tagged , , , , , | Leave a comment

ValueError: No JSON object could be decoded – cuTorrent

cuTorrent is a simple command-line tool that interacts with remote uTorrent instances through thier webui. To use cuTorrent you must have uTorrent running with the webUI on. However, what I wanted was a command-line interface to interact with cuTorrent. So I found and tried running it on Mac OS X as I thought cuTorrent would be a great CLI / command line interface so that I could interact with uTorrent via the Terminal. After running it I got errors like ValueError: No JSON object could be decoded and also: $ ./cuTorrent.py -a list -p 56426 cuTorrent By: Saul Bancroft <saul .bancroft@gmail.com> +list+ Traceback (most recent call last): File “./cuTorrent.py”, line 270, in <module> main() File “./cuTorrent.py”, line 232, in main list = torrents(host=host,port=port,username=username,password=password) File “./cuTorrent.py”, line 112, in __init__ self.update() File “./cuTorrent.py”, line 115, in update l = self.connection.webui_ls() File “/private/tmp/tmp/cutorrent.1.0.beta1.tar/cutorrent/uTorrent_py/uTorrent.py”, line 203, in webui_ls return self.webui_action(r’/gui/?list=1′)['torrents'] File “/private/tmp/tmp/cutorrent.1.0.beta1.tar/cutorrent/uTorrent_py/uTorrent.py”, line 135, in webui_action return simplejson.loads(webui_response.read()) File “/private/tmp/tmp/cutorrent.1.0.beta1.tar/cutorrent/simplejson/__init__.py”, line 201, in loads return cls(encoding=encoding, **kw).decode(s) File “/private/tmp/tmp/cutorrent.1.0.beta1.tar/cutorrent/simplejson/decoder.py”, line 249, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File “/private/tmp/tmp/cutorrent.1.0.beta1.tar/cutorrent/simplejson/decoder.py”, line 268, in raw_decode raise ValueError(“No JSON object could be decoded”) ValueError: No JSON object could be decoded Since the project on GoogleCode had not been updated in several years, I started looking into rTorrent which is natively a CLI torrent program. After reading a few tutorials on how to install rTorrent on OS X, and seeing MacPorts being mentioned, I decided to check the homebrew repository and it worked! My solution … Continue reading

Posted in Mac | Tagged , , , | Leave a comment

Lion: Set External Display As Primary

Instructions for setting an external monitor as the primary display on Mac OS X Lion. First – open Displays Preference Pane Next, choose the “Arrangement” tab The key here is that you need to drag the white bar from one of the displays to the other one as shown in the screen shot below:

Posted in Mac, Tech Tips | Tagged , , , | 1 Comment

Error: couldn’t connect to server 127.0.0.1 shell/mongo.js:84 – SOLVED

I was having an issue on Mac OS X – this is probably because I installed it with homebrew a few months back and forgot about these instructions. $mongodb MongoDB shell version: 2.0.6 connecting to: test Sat Jun 16 09:11:43 exception: connect failed Error: couldn’t connect to server 127.0.0.1 shell/mongo.js:84 I search for a solution but didn’t easily find one, so I ended up uninstalling it and reinstalling it, which then gave me the very valuable notes below about where config files and data paths are stored on OSX, and also let me know that I needed to start the service if I wanted to use it. Here are those notes: Downloading http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.0.6.tgz Already downloaded: /Users/me/Library/Caches/Homebrew/mongodb-2.0.6-x86_64.tgz Caveats If this is your first install, automatically load on login with: mkdir -p ~/Library/LaunchAgents cp /usr/local/Cellar/mongodb/2.0.6-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist If this is an upgrade and you already have the homebrew.mxcl.mongodb.plist loaded: launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist cp /usr/local/Cellar/mongodb/2.0.6-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist Or start it manually: mongod run –config /usr/local/etc/mongod.conf The launchctl plist above expects the config file to be at /usr/local/etc/mongod.conf Summary /usr/local/Cellar/mongodb/2.0.6-x86_64: 18 files, 122M, built in 2 seconds You might want to run brew update and brew upgrade to update / upgrade all of your homebrew packages, or brew update and brew upgrade mongodb to update mongodb to the latest version. A few other notes if you’re using homebrew: # updates the database of available software and what the latest # available version for each is. run this … Continue reading

Posted in Mac, Tech Tips | Tagged , , , | Leave a comment

Quicksilver: Disable Shelf Popup

As of a recent release of Quicksilver (around B68 3927) the shelf module has been revised (version 1.2.3 5/9/12) and it will now pop up on the left side of the screen if you hover your mouse cursor near the center of the screen: I love quicksilver but personally find this a little annoying. As far as I can tell there is no visible option to customize where the settings are for the shelf’s behavior, but if you don’t use it you can disable the shelf in Quicksilver’s plugins module: If there is a way to disable the shelf from appearing on the left side you may be able to access it directly with something like the defaults write command. This command turns previews on: defaults write com.blacktree.quicksilver “QSLoadImagePreviews” YES

Posted in Mac, Software, Tech Tips | Tagged , , , | 2 Comments

Mac OS X Dock Preference Settings (secrets)

###Animate launch### defaults write com.apple.dock launchanim -boolean Expose minimizes desktop defaults write com.apple.dock wvous-olddesktop -boolean Prevent changes to position defaults write com.apple.dock position-immutable -boolean Magnification defaults write com.apple.dock magnification -boolean Show Expose corners defaults write com.apple.dock wvous-showcorners -boolean Prevent changes to min-effect preference defaults write com.apple.dock min-effect-immutable -boolean Ripple when placing widgets defaults write com.apple.dock disable-ripple -boolean-neg Screen Edge Position defaults write com.apple.dock orientation -string left defaults write com.apple.dock orientation -string bottom defaults write com.apple.dock orientation -string right Dock Appearance defaults write com.apple.dock no-glass -float Prevent changes to min-in-place preference defaults write com.apple.dock min-in-place-immutable -boolean Arrow key wraps defaults write com.apple.dock workspaces-wrap-arrows -boolean Dock pinning defaults write com.apple.dock pinning -string Bounce Applications defaults write com.apple.dock no-bouncing -boolean-neg Show “Quit” menu item defaults write com.apple.dock QuitFinder -boolean Switch spaces when using Command-Tab defaults write com.apple.dock workspaces-auto-swoosh -boolean Highlight the arrow of the foremost application defaults write com.apple.dock showforeground – wvous-float-style defaults write com.apple.dock wvous-float-style – Dim hidden apps defaults write com.apple.dock showhidden -boolean Prevent changes to Dock contents defaults write com.apple.dock contents-immutable -boolean Show only running applications defaults write com.apple.dock static-only -boolean Hot Corner: Top left defaults write com.apple.dock wvous-tl-corner -string Show shadow defaults write com.apple.dock showshadow -boolean Always show trash as empty defaults write com.apple.dock trash-full -boolean Prevent changes to Dock size defaults write com.apple.dock size-immutable -boolean Enable single application mode defaults write com.apple.dock single-app -boolean Hot Corner: Top right defaults write com.apple.dock wvous-tr-corner -string Autohide defaults write com.apple.dock autohide -boolean Show floating Expose button defaults write com.apple.dock wvous-floater -boolean … Continue reading

Posted in Mac, Software, Tech Opinion | Tagged , , , , , | 1 Comment

Applescript: Check Application Is Running

Below is my Applescript example of how to check if an application is running, such as Finder.app, VLC.app, itunes.app, or something along those lines. Quite often I need to check if an application is running as part of my applescript, and so I use this little function / subroutine in applescript to test if the application is running: on appIsRunning(appName) tell application “System Events” to (name of processes) contains appName end appIsRunning Example usage: display dialog appIsRunning(“Finder”) The above apple script example will show “true” in a popup dialog.

Posted in Mac, Software, Tech Tips | Tagged , , , , , , , , | 1 Comment