Most popular posts in 'Geekery' category.
Archive for the 'Geekery' Category
I’ve been disappointed that the Mac OS doesn’t provide a watch command. It’s a very useful command, so its absence from the operating system has always baffled me. Well, after using simple bash before, I finally implemented a better replacement in python.
Here is version 0.1 » Click here to read the rest. «
Popularity: 1% [?]
The Mac Terminal.app is one of the best Terminals I have used, but it has some annoying quirks like not supporting standard key definitions out of the box. The most frustrating ones are Home and End.
In nearly every OS, Home has meant “go to the beginning of the line” and End has meant “go to the end of the line,” but on the Mac, the default has always been for Home to scroll a document up to the top and for End to scroll the document down to the bottom.
However, since most Terminal applications aim for the Unixy world, they don’t care about scrolling through documents as much as dealing with the line you are on.
Luckily, the Mac Terminal has the ability to let the intrepid user customize it’s keybindings. If you want to make your Terminal operate like a standard Unix-like terminal, follow these simple steps:
- Open the Terminal app.
- Select Preferences from the Terminal Menu.
- Under Settings, select a Profile you want to change.
- In the right pane, select the Keyboard button to see keyboard settings.
- Select the line that has the word “home” in the “Key” column.
- Click the Edit Button at the bottom.
- Make it look like this:
- To enter the right key code, clear the box and type these keys in order: ESCAPE O H (that’s a capital letter o, not a zero)
- The right key code for “end” is exactly like “home” but you replace the “H” with an “F”.
Some Linux/Unix Friendly Keycodes (submit your own in the comments):
- home ::
- end ::
- F1 ::
- F2 ::
- F3 ::
- F4 ::
Other links that worked but had problems:
The main problem with each solution below is that they only work part of the time. My solution above is compatible with the latest version of Mac OS X (Mountain Lion), and is also the default key binding for xterm, remote shells (ssh), vi(m), and also GNU screen. Each of the solutions below only work in a few of the cases for me.
Popularity: 1% [?]
I maintain two separate workflows. On the one hand, I do a lot of writing, and I like to work in plain text for the most part. As a result TextWrangler is my favorite Mac text editor for that. I have it configured to be all black background, no margins, light color text, etc. It’s perfect for distraction free writing.
I also do web programming and Text Wrangler is the best free text editor for that too. However, when I do web programming, I want syntax coloring, tab indicators, the open file sidebar, and other settings as well.
Ideally, I want to have two copies of TextWrangler with completely different preference files, different icons, etc. I want to create a custom version of my favorite text editor.
With about 20 minutes of Internet searching and 10 more minutes of tweaking, I was able to get 90% of my holy grail customized!
Here’s how to do it yourself with TextWrangler, and I think the principles should apply for creating customized versions of other apps as well.
- Copy TextWrangler to a new location (I put it on my desktop at first)
- Rename the app file to whatever you want. I chose “DarkRoom” as an homage to WriteRoom.
- Right click on the app icon and choose “show package contents”
- Double-click on the “Contents” folder
- Open up Info.plist using your original TextWrangler App or any other text editor.
- Replace all instances of “com.barebones” with “com.custom.barebones” (this changes where OS X stores the preference files on your computer)
- OPTIONAL: replace instances of “textwrangler” with your customized name. There is one instance in the original file of “com.barebones.textwrangler” that after step 6 will be called “com.custom.barebones.textwrangler” You can freely change that to anything you want. For mine, I changed the word textwrangler to darkroom.
FINAL OPTIONAL TWEAKS: Replace instances of “TextWrangler” with your customized name. There are hundreds of instances of TextWrangler and changing the wrong ones might break your app, however there are a few ones you can change safely without breaking things. To determine which you can change, read the
field. Key string pairs look like this:
<key>CFBundleTypeName</key> <string>TextWrangler text document</string>
You can safely change any string in the following keys:
ADVANCED TWEAKS: You can also change the icons for the app by going into the “Resources” directory and replacing any one of the icons with a different icon so long as you keep the file name of the icon the same.
When you are done, you’ll be able to have two completely different instances of your app running at the same time with different preference settings and you can associate different file types with different apps.
Here’s a screenshot:
For those who want it, here is my entire plist file.
When you open your edited app, it will behave like a completely new installation of TextWrangler and it will use separate preferences files…
HOWEVER: Your customized app and the original TextWrangler app will use the same recent document list. That means if you have one of them set to “reopen last document” it will open the document that is currently open in the other editor. It’s a bit annoying, but I haven’t found a way to solve that problem yet.
Popularity: 1% [?]
I have created a properties file for SciTE that makes it work just like Write Room or Dark Room, but it’s cross platform and fast! Plus, if you start a paragraph with a tab, the entire paragraph is indented even if there is wordwrap turned on!!
Set this as your user.properties or global.properties script and press f11 to go fullscreen: » Click here to read the rest. «
Popularity: unranked [?]
I just got a phone call from a guy in town whose name was so interesting I had to call him back. Anyway, Elvis of http://www.elvisblogs.org is a Drupal developer here in town who is hosting a Drupal Meetup and he wanted to know if I was interested in it.
I used to use drupal way back in the early days of our church planting adventure and you can still see the remnants of it at http://thesouthsidechurch.org/main/ but I moved away from it because of frustrations with the platform.
Anyway, now that I know there are Drupal addicts here in town, I may take a second look at the platform and also make some friends in the process.
Looking forward to meeting you in person Elvis!
Popularity: unranked [?]