Posts Tagged: hack


17
Jul 10

An easy hack to sharpen images on iPhone 4

I recently released my first web app ported to the iPhone and Android devices. Only a couple days after deploying it, I found out about the increased DPI on the new iPhones.

Once I got my own iPhone 4 to test with, I noticed a huge problem with my web app. The images all looked pixelated against the beautiful text on the display. Not wanting to redo the CSS and header to define a larger viewport, I started to look for better solutions.

I decided to put larger images into the page than the tags were coded for. This way, the images would be resized smaller for the iPhone gen 1, 2, and 3. But for the iPhone 4, it would “zoom” the image to native resolution.

  1. Figure out the ratio that you need to increase all your images by.  This is the formula that I used… (960 / (viewport width)) * (image dimension).  My viewport was set to 320px and my image was 280px, so my equation looked like this:  (960/320)*280.  So, I created new images that were 840px wide.
  2. Since I already had my image tags defined with the appropriate height and width, I just saved the larger images as the same file names.
  3. Success.

This turned out really great, the iPhone does a fantastic job at scaling images, so it looks great on the older iPhones and looks fantastic on the new ones.  Check out the demo.

How to find the viewport on your web app.

<meta name=”viewport” content=”user-scalable=no, width=320” />

If you are using “device-width” as the viewport width, assume 320.
<meta name=”viewport” content=”user-scalable=no, width=device-width” />

A CSS based alternative solution

The folks at sitepoint suggest a CSS alternative that I believe is probably better if you are still in the development phase of your project.  Razor-sharp Images in Mobile Safari on iPhone 4

The only flaw I see in their solution is formula that they use to calculate image size.  Their double the size method does not accommodate for horizontal mode on the phones.

Old iPhone, before hack

Old iPhone, after hack

iPhone 4, before hack

iPhone 4, after hack


29
Mar 10

New Google easter egg

So, I am pretty much the worst speller ever. As such, I am always using google as a spell checker. Anyhow, today I was uncertain of the spelling of “recursion”. So, I googled it.

For those who do not know that recursion is… A recursive function or a subroutine is one that calls itself.

Recursion at Google

Let me google that for you.

Heck yeah, I love geek humor.

Cheers,
Jonathan


25
Mar 10

The greatest program ever

The telecrapper 2000 telemarketer interception system is quite possibly the greatest program of all time. Basically, you hook your phone into your computer and the computer filters out the telemarketer. That alone is a pretty great feature. But, it gets better.

You configure the application with 2 simple configuration files. The first one is a list of phone numbers to filter out. The second one is a simple list of .wav files. Instead of just hanging up the phone on the telemarketer, the application immediately plays the first .wav file in the config. The program then waits for silence. Then the app plays the next .wav file. This simple loop will continue until A) the telemarketer gives up B) the app runs out of wav files to play.

As if this was not good enough, the app records the conversations. Check out some examples…

What is your favorite color?

Garbled

Is this Chris?

Most people around here are family folk.

The app is open source, but it looks like the hookup to the phone is kinda janky. Check it out: TC2K

Cheers,
Jonathan


6
Oct 09

Nice life hack with Mediacom

Most of my close friends can tell you that I do not like Mediacom.  In fact, I hate most telcos in general.  But Mediacom holds a special place on my shit list.  They are particularly evil.

  • They have this thing where for the first year you get fair priced service.  $90ish for digital cable + broadband.  The only problem is that after a year, it jumps up to like $120.
  • A few years ago, they put in the DNS resolution stuff that sends you to their paid search results when you look up an invalid domain.  When they did this, they introduced frequent artificial outages that lasted for at least 3 weeks.  It didn’t take but an hour or 2 for me to figure this out, and I pointed my DNS resolution to Open DNS.  After that, I no longer had issues.  But everyone else that I knew with Mediacom continued to suffer.
  • Their customer support is just this side of worthless.  At one point, years ago I paid a few extra dollars for a static IP address.  The install kit did not contain my IP, subnet, gateway, etc.  I called customer support to get this required data.  The 1st and 2nd tier support did not know what a static IP was.  In fact, the 1st tier insisted that I did not want this anyhow.  Finally after about 30 min, I was sent to someone that knew the first thing about networking and I had my data.  Several times when I used their services, the customer support insisted that they dot not support Linux or non-M$ systems.
  • Their interface for their Digital Cable is non-intuitive.  If you press the up button while watching a channel, it goes up one (channel 13 –> 14 for example).  But, when you are navigating the guide pressing the up button results in going down a channel (channel 14–> 13).  I’m a little anal about GUIs, so that my be insignificant to most of you.

But back to the hack…

I had a friend who just got a new apartment.  This person called Mediacom and they quoted her $90 for Digital Cable + Internet.  The friend agreed.  After a couple days, the person changed their mind and canceled right before the installer arrived.  My friend had discovered an open Wi-Fi network nearby.  The next day, this person got a phone call from Mediacom.  They called to offer her the same package, but this time for $50.  Rock on.  That’s pretty cheap.

By canceling, the friend was placed on a cancellation or save list.  This enabled the person for significant discounts.

Cheers,
Jonathan


31
Dec 08

Embarq does not care about your safety

Last month I was able to finesse my way into naked DSL. I know, a lot of ISPs offer this but here in Jefferson City Missouri, no one openly admits that it is possible. In fact, you have to talk to a special level of customer support called the “save desk” to get it. But this article is not about naked DSL. This article is about Embarq’s inadequate security measures.

In my prior DSL usages, the ADSL modem has more or less behaved as a bridge by default. This sucks because most users will just plug the device directly into their windows based PC, thus allowing the world to view their C$ share or other obvious Microsoft vulnerabilities (assuming you use Microsoft Windows). But Embarq did something different. Their device came configured more as a router. Typically, I would praise this type of behavior. However, I would soon change my mind.

I host this website over my DSL connection. So, I needed to test my configuration under the new ISP. I found my public IP and navigated to it. To my disgust this form came up.

embarq-1

Wow, this is bad. So, it appears that I have a remotely accessible administrative console on my new ADSL modem. So, I’m already pretty upset. But then I notice that the password is PRE-POPULATED for me. So without changing the password, I click “Login”. , I am now presented with a screen that tells me what the default password is (“1234″). This screen also prompts me to change my password. So, I change my password and press “Login”.

embarq-2

So, lets see what we can do now…

embarq-3

Ok, it looks like I can now modify any of the settings that a normal consumer grade router provides me.

There are many attacks that may be performed with this console, so many that I can not even begin to think about the possibilities.

After a beer or 2, I calmed down and convinced myself that a warning to change your password must have been included in the documentation. So, I read though all the documents that came with the ADSL router. Sure enough, there is no mention of this administrative console, nor is there mention that you need to change this password.

This all leads me to one conclusion… Embarq does not care about your safety.

Cheers,
Jonathan Forck