blog

[ 10:11 AM on July 30, 2010 ]

This suits me more than What's on your mind.

where-is-my-mind.png
frankblack.user.js

[ 09:14 AM on July 25, 2010 ]

Snitter, snitter, I ran across one of yourdatabases, and I'm having second thoughts about giving you any more personal information.

snitter.png

[ 01:29 PM on July 23, 2010 ]

I'm not good at making decisions, thank you Winzip.

winzip.png

[ 10:42 AM on July 23, 2010 ]

While my mind was wandering not doing exactly what I should, I thought I would do something else not technically what I should be doing, but by doing so, reducing the time it takes to do the first thing. It's like self-optimizing procrastination...This is a little bookmarklet to inline the images listed on /r/pics on reddit.
reddit pics

[ 01:12 PM on July 03, 2010 ]

For Leo.

[ 10:19 AM on July 03, 2010 ]

I've probably gotten more mail from users of this then from friends, family, and coworkers the past week. It was broken, it's fixed, enjoy.

[ 09:41 AM on June 24, 2010 ]

Step up your game iphone spell checker:

ass-me-up.png

[ 09:38 AM on May 29, 2010 ]

ke8y shortcut emacs is a google query that returns no results, which brings us to interview question whatever...

What is the probability that a google search returns no results?

This is one of those, "if you get it right, and as long as you don't club baby seals, you're hired." It's a toss up whether I'm for questions that result in "you get this wrong and you're not hired", because I can't think of a question that, when answered wrong, completely invalidates someone's knowledge, besides, of course, anwering vi to "what's your favorite text editor" (Of course, as I write this emacs is hanging, it must be thinking... you don't get that with vi). And for Pete's, I got "what is a join on a database" wrong and I still got the job, a damn good job, too. Though, i do know what a join is now, Though, if the truth must be known, I never needed that knowledge to do the job. And, it could be debated what job I was doing...that's for another time.

I'd like to say I'm for strict rubrics on interviews--e.g. the candidate has to answer two of the three questions correctly, because I would normally advocate having quantitative evaluation criteria--but people are so subjective. Because, as I said earlier, I don't think there's a question, that when answered incorrectly couldn't be made up for with some other feet of intelligence. Basically, to me, if you're (1) smart and (2) not a dick, I for hiring. There's nothing a smart person can't learn, and there's no amount of time that can allow one to tolerate a dick. Both are crucial. I've yet to come up with a nice quantification of being a dick, though questioning whether one of the queries that the interviewer asks is really pertinent would certainly point to being a dick; and probably to being not smart. Even if it's not pertinent to the potential job, you're stupid for asking that.

[ 07:17 PM on May 28, 2010 ]

Darth Tater as Chart Tater at http://jeffpalm.com/charttater/ using google charttools

.
chart-tater.png

[ 08:00 AM on May 20, 2010 ]

I get annoyed when I copy a file using either a spiffy file system tool -- like Finder or Explorer -- or an IDE that's not emacs it the resulting file ends up with a rediculous name that ends with a number or starts with Copy of -. Seroiusly, who in their right mind would ever want to copy a file and have the resulting file actually named something that begins with Copy of -. So, I propose a smarter copying scheme that infers the repetion you'd like to do on the name of a file and produces multiple copies using this idea. That was a shitty explanation, but basically, if I give this thing NorthUpLeft.txt, I don't want to get out NorthUpLeft-1.txt or Copy of - NorthUpLeft.txt; instead I probably would want a bunch of copies for directions north, south, east and west; also copies fo the directions up and down; etc. Anyway, smart_cp does this on the command line and is mindful of underscores, camel case, and numbers. If the input file doesn't exist, it just prints what it would copy. For example:
% ./smart_cp north.txt
north.txt
south.txt
east.txt
west.txt
or
% ./smart_cp north_north.txt
north_north.txt
south_north.txt
east_north.txt
west_north.txt
north_south.txt
south_south.txt
east_south.txt
west_south.txt
north_east.txt
south_east.txt
east_east.txt
west_east.txt
north_west.txt
south_west.txt
east_west.txt
or
% ./smart_cp NorthUpLeft1.txt
How many occurrences would you like> 3
NorthUpLeft1.txt
NorthUpLeft2.txt
NorthUpLeft3.txt
NorthUpRight1.txt
NorthUpRight2.txt
NorthUpRight3.txt
NorthDownLeft1.txt
NorthDownLeft2.txt
NorthDownLeft3.txt
NorthDownRight1.txt
NorthDownRight2.txt
NorthDownRight3.txt
SouthUpLeft1.txt
SouthUpLeft2.txt
SouthUpLeft3.txt
SouthUpRight1.txt
SouthUpRight2.txt
SouthUpRight3.txt
SouthDownLeft1.txt
SouthDownLeft2.txt
SouthDownLeft3.txt
SouthDownRight1.txt
SouthDownRight2.txt
SouthDownRight3.txt
EastUpLeft1.txt
EastUpLeft2.txt
EastUpLeft3.txt
EastUpRight1.txt
EastUpRight2.txt
EastUpRight3.txt
EastDownLeft1.txt
EastDownLeft2.txt
EastDownLeft3.txt
EastDownRight1.txt
EastDownRight2.txt
EastDownRight3.txt
WestUpLeft1.txt
WestUpLeft2.txt
WestUpLeft3.txt
WestUpRight1.txt
WestUpRight2.txt
WestUpRight3.txt
WestDownLeft1.txt
WestDownLeft2.txt
WestDownLeft3.txt
WestDownRight1.txt
WestDownRight2.txt
WestDownRight3.txt
This probably involves finding a fix point or something, I don't know.

[ 12:58 AM on May 17, 2010 ]

Thank you Windows...
windows-help.png

[ 01:49 PM on May 16, 2010 ]

The HTML5 canvas object is cool -- not sticky-pants cool -- but cool, and what better way of exploring it than to try different ways of rendering a certain potato. So, these are a few images rendered purely in Javascript, the links below point to the source:

source

source

source

source

source

source

source

source

source

source

source

source

source

source

source

Made with ToHtml5.java.

[ 01:47 PM on May 15, 2010 ]

fullimage now inserts both the direct image link and direct page into google image search results. So, if you were, for example, searching for cats in bags, you wouldn't have to click through to the next page to get the image and/or direct link:
cats-in-bags.png

[ 10:10 PM on May 14, 2010 ]

In an attempt to bring darth tater to every medium...I give you, Emacs Darth:
emacs-darth.png

[ 11:51 PM on May 09, 2010 ]

In order to make scrolling a web page even more efficient, pageup.user.js allows you to page up/page down using your left/right arrow keys. What it does is that, if there isn't any overflow -- i.e. no horizontal scroll bar -- the left arrow will page up and the right arrow will page down. If there is a horizontal scroll bar, nothing new will happen. This means that in the normal case -- with no horizontal scroll bar -- you can use just the arrows to quickly navigate a page, which is actually kind of convenient.

[ 01:15 PM on May 09, 2010 ]

googleplus.user.js is a greasemonkey script to go to google's first hit when you add a + to the end of your search. For example:

googleplus.png

Here's the use case: I type my search into the address bar a lot and usually want to see all of the search results. But, sometimes, I know I just want to go to the first result and don't want to use my mouse again. So, in these instances, I can now just add a + to the end of the search in the address bar and will be taken to the first result.

[ 08:47 AM on May 08, 2010 ]

Updated my user script fullimage to work on the new google image format -- i.e. I updated the matching URLs. It inserts direct links to the full image results in google searches, rather than having to go to an intermediate page. For example, if one searched for spud trooper normally, that person would see the following:

Using this script the results would change to:

[ 07:52 AM on May 06, 2010 ]

Here's a crucial bookmarklet to animate the default clouds on twitter:
animate twitter
After you click it on a twitter page, the clouds will start drifting to the right -- and your day will be complete.

[ 03:59 PM on May 03, 2010 ]

I just received this in my email
cvs-mothers-day.png

I would say, in honor of Mother's Day to not shop at CVS for Mother's Day.

[ 09:49 AM on May 03, 2010 ]

This is the white whale...
He bolts off the train every morning directly to the elevator at North Broad and doesn't wait for anyone. I beat him today. Suck on that, WW.

[ 05:03 PM on May 02, 2010 ]

APK files are the archive files on which Android applications are transported. In these is a manifest, which is essentially an XML file with meta data about the application and its components. I thought it would be useful to have something on the command line to find the version code and version name of an APK. On the outset it also seemed pretty straight forward, since an APK is just zipped, so I could just extract the manifest, do some filthy XML parsing to get these attributes and print them out. I didn't know the file was encoded in some undocumented binary XML format, so I thought I'd post the results if anyone is idiotic to need the same utility, to save a couple mouse clicks:
APK.java
Some sample output (don't let this give you sticky pants...):
Results -----------------------
versionCode         : 12121212
versionName         : 10.114
The bulk of the work is done in a creatively-named method, read, where there are some comments on the apparent file format. I think there's basically this:
  • A magic number
  • Stuff
  • A string table containing
    • A list of offsets into this table
    • The strings themselves
  • Binary encoded XML consisting of recursively-defined:
    • Tag reference into the string table
    • Flags identifying the node
    • More information
There's lots of stuff in there I couldn't figure out, or really cared about. Luckily, the versionCode and versionName attributes lie in the top-most tag, manifest and weren't too hard to pick out.

[ 09:40 PM on April 21, 2010 ]

Ah, another fairly easy Java interview question:

If the following line of code compiles and throws an exception when running, what are the valid static types of the variable v and the possible types of the thrown exception?
int i = v;

[ 02:05 PM on April 21, 2010 ]

I read forum messages on osdir.com from time to time, and it's annoying that the messages in a current thread aren't sequential and the next thread message link is way at the bottom of the page. So, to ease this world-ending pain, here's a bookmarklet to go to the next message i n the current thread:
osdir next thread message

[ 10:14 AM on April 19, 2010 ]

Counting down seconds until freedom...
http://jeffpalm.com/newphone/

[ 07:06 PM on April 18, 2010 ]

I cut my hair.

[ 03:41 PM on April 16, 2010 ]

The inbox of doom:

inbox-of-doom.png

[ 01:07 PM on April 16, 2010 ]

Since my iphone decided it didn't need any of my music, contacts, or other I'm reinstalling things; apps require accepting the new Terms of Service. So, I get to them, and they look ok:
iphone-tos1.png
Then, I scroll to the bottom to accept:
iphone-tos2.png
92 fucking pages?!?!

[ 12:23 PM on April 16, 2010 ]

I listen to the NY Times subscription from Audible, and I love it -- not because I'm an intellectual, more because I hate to read. Anyway, getting the subscription involves too many clicks for my taste; so audibledownload.user.js is a user script that will expand your latest subscriptions, search for your subscriptions for today, and then initiate a download for each of them. So, this allows you to listen to you subscriptions with one click -- just go to your Audible Library.

[ 01:53 PM on April 14, 2010 ]

There are times that I think facebook is physically in my brain, especially when they give me friend suggestions like this:
facebook-friend-suggestion.png
Hats off to you, facebook team.

[ 11:41 PM on April 03, 2010 ]

Looks like Android doesn't want me to change my background to some things:
clown-fish-android.png

[ 04:55 PM on March 25, 2010 ]

geemail.user.js is a uesr script to allow you to easily use site-specific gmail (or another) email addresses. For example, if you are visiting linkedin.com, then the mail input value would be site-specfic -- e.g. jeffpalm+linkedin.com@gmali.com -- and change from
geemail1.png
to
geemail2.png
If you haven't entered an email address you are prompted for one. If you want to clear the current one used go here or any URL with a resetGeemailUsername in it.

[ 02:38 PM on March 25, 2010 ]

What a wonderful review
cross-review-jeff.png
It's down the page a little, search for "What We're Listening To"...

[ 04:30 PM on March 22, 2010 ]

For the record, I made this while waiting for my phone to reboot -- so it's not a waste of time...But, use this user script, nofarmville.user.js, to remove any facebook post about farmville.

[ 03:25 PM on March 20, 2010 ]

bus-science.png

[ 09:41 PM on March 18, 2010 ]

Having run out of all my free hours on Pandora with 17 days to go earlier this week, and not having deep pockets to fork over the $0.99 to listen unlimitedly for the rest of the month, I'm now on to last.fm. But, I haven't completely acclimated...for example, I up the tracks I like on Pandora, but it seem like the only equivalent on last.fm is to heart a track. I don't know if I'm comfortable doing that -- making it's my fear of intimacy, but I'd like to just be able to say "I like a track"... nothing more.

[ 02:53 PM on March 17, 2010 ]

find_unused_images is a script to find unused images in an Android project, so you're not releasing bloated software with unused resources. By unsused, these images are not reference in Java code or XML markup. Without arguments it simply prints the imgage paths; passing the -s prints a little summary like:
# images            :        129
# found             :         75
# unused            :         54
size images (bytes) :     205591
size found  (bytes) :      89599
size unused (bytes) :     115992
And, passing the -m will move these images into a unique, new directory.

[ 06:10 PM on March 14, 2010 ]

I ran into these "in case you forget your password" questions while signing up for a yahoo email account. I won't say where, because I know the overwhemly-large number of read my blog would clrearly take down there servers.

questions.png

These are idiotic...

What is the name of your favorite uncle?
What is the name of your favorite aunt?
What is this changes?
Where did you meet your spouse?
So, we don't care about Mormon women or guys who can keep really good secrets anymore?
What is your youngest child's nickname?
What is your oldest child's nickname?
Parents don't know their kid's nickname. Take my heroin Harry you think his Mom knows that's what he's called. And, no ,his real name's not Harry, either.
Who is your oldest cousin's name?
What is the first name of your oldest niece?
What is the first name of your oldest nephew?
Who the fuck knows this!!! I don't know these peoples names.
Where did you spend your honeymoon?
What if you've had more then one? Again, attacking the Mormons...

[ 03:08 PM on March 14, 2010 ]

If you don't really care who your facebook friends are now friends with or is a fan of us this user script: noarefriends.user.js. It'll remove these status updates.

[ 08:04 PM on March 11, 2010 ]

It's annoying converting hard-coded attributes into styles for Android. For example:
android:paddingTop="3px"
into
<item name="android:paddingTop">3px</item>
but a lot of times... So, this is a little (very little) script to do it automatically.
#!/usr/bin/ruby -n

$_.scan /(\S+)="([^"]+)"/ do |res|
  puts '<item name="' + res[0] + '">' + res[1] + '</item>'
end
That's my contribution to society for this Thursday, March whatever, 2010.

[ 03:36 PM on March 11, 2010 ]

I sometimes just sit and watch my securid change
just waiting to it to change to something 'cool', so I can post it to a fake news site -- like 3i9009.

[ 02:48 PM on March 10, 2010 ]

Eclipse's Android Development Kit is cool, but some things are a pain in the ass -- e.g. adding a string resource. So, add_string is an ever so trivial, but pretty useful script for creating string resources in Android projects. You pass it the name of the resource and the value of the resource as the rest of the arguments. For example, to add the string "Weinberg is a bag of douche" with the name weinberg, I'd do the following:
> add_string weinberg Weinberg is a bag of douche
Then res/values/strings.xml will be updated with the correct new value. If I try it again, I'd get a message saying this string name already exists and nothing would be written. If I tried again with a different name but same string I'd get a message saying the same string exists, but wouldn't exit.

[ 06:11 PM on March 06, 2010 ]

newepisodes is a bookmarklet to only show episodes on fancast.com that have new episodes. After dragging this link -- newepisodes -- to your toolbar, click it when you are on the full episodes page, and the list will change from something like this:
fancast-1.png

to something like this
fancast-2.png