AdSense

Pages

Monday, April 25, 2011

For those of you that read my other post about useful .cshrc functions, you know that I like to automate as many processes as possible. If there is something redundant that I do frequently, I will script it or make a function to take care of it.

In an effort to assist those of you out there that like to automate processes but use bash instead of C-Shell, I have compiled a list of some useful functions to stick in your .bashrc file. Here is a list of the functions that this post will contain:

Extract: This function will determine the type of archive you are dealing with, and issue the corresponding command to extract it.

Compress: This function will create a .tar.gz archive of whatever files you give.

One rather frustrating thing that I have noticed with the iPad (and iPhone) is the inability to search for text within Safari. Well as it turns out, a simple javascript bookmark is all you need to add this functionality to any iOS device (just like my post on viewing source code).

To enable finding text within any website, follow the below instructions:

Open Safari (pretty self explanatory).

Create a new bookmark.

In the Title window, write whatever you want your bookmark to be named (I chose "Find on Page")

Friday, April 22, 2011

Occasionally, when browsing the web I have a need to view the source code for a certain page. However, there is no intrinsic way to do so on the iOS version of safari. Well, using some simple javascript bookmark you can view the source code for any webpage.

To view the source code, follow the below instructions:

Open Safari (duh!)

Click the "Add Bookmark" button in Safari.

Give the bookmark whatever name you wish; I chose the title "View Source".

Thursday, April 21, 2011

About once a month or so, I search around online for the best iPhone jailbreak apps. I don't usually have the time to search through all of the new released in Cydia, so I tend to rely on other people's posts.

In an effort to provide some app ideas to new jailbreakers, below is a list of my 10 favorite jailbreak apps for the iPhone (in no particular order).

1. LockInfo

To me, this is an absolute must have app for the iPhone. What this app does is puts many iPhone notifications together into a single user-friendly UI. There are many different plugins for LockInfo, such as a plugin that displays RSS Feeds, a plugin that displays tasks from the AppStore 2do app, etc.

There are a few reasons why somebody might want to check the current battery percentage of a bluetooth mouse and/or keyboard within Terminal on a mac. Some that come to mind are for use in GeekTool, if you are connected to the computer remotely through ssh, etc.

Well as it turns out, its actually very easy to do. The tool that we will use to check the battery percentage is called "ioreg". The Mac OS X manual describes ioreg as a tool that "displays the I/O Kit registry. It shows the hierarchical registry structure as an inverted tree."

There are many options available with the ioreg tool, however this article will just be discussing how to check the battery percentage of different devices. See the below text for the code to view the battery percentage:

Wednesday, April 20, 2011

I strongly believe that a script should be created to handle any repetitive process in the terminal.

By default, when you create a new script, it does not have executable permissions. So for each script that you create, you then have to chmod the file to be executable. However, its kind of hypocrital to say that a script should be created to replace any repetitive process and then not figure out a way to automate the 'chmod' command when creating a script.

Well, as it turns out, a simple addition to your vimrc file will automatically make any newly created script an executable (so long as you have the '#!' in the file).

Tuesday, April 19, 2011

As part of my research for my Ph.D. I am on a team that is currently developing an adjoint of the EPA's CMAQ air quality model. In the process of integrating all parts of the model into the full adjoint model, I ran into an error that was rather difficult to resolve.

Running the model would result in many occurances of the following error: