Lately I’ve been trying to run some load scripts that basically take data from mySQL and convert them to a Redis Luke Protocol. Part of the reason why I wrote it in Java was because the cached object needed to be Java serialized.

I ran into some issues while running some tests. It seems that my Eclipse memory heap was not big enough. Here are steps to increasing it.

1. Open Eclipse
2. Eclipse > Preferences > Java > Installed JREs

installedJre

3. Select the current JRE
4. Select “Edit”
5. Modify the default JVM properties to something like:
-Xms512M -Xmx1024M

editJre

creating a USB install disk is super easy now.

1. Download the Mavericks installer
2. it should be located /Applications/Install\ OS\ X\ Mavericks.app
3. Open up terminal and navigate into the Resources section of the app
/Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources
4. Run the following command:
sudo ./createinstallmedia --volume /Volumes/ToFormat --applicationpath /Applications/Install\ OS\ X\ Mavericks.app

* notice that we named our volume “ToFormat”, you must insert the name of the volume you want to reformat.
** there are some other instructions on the internet, which require you to search for the base system.dmg, but the issue with that method is that it does not automatically create a recovery hd partition, so that features like file vault are not available.

When attempting to use php micro frameworks on 1and1, the key is having the correct .htaccess file

if should look like this:
Options +FollowSymLinks -MultiViews

AddType x-mapp-php6 .php
AddHandler x-mapp-php6 .php

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]

If you are having concurrency issues as a result of high loads, something to check if the JVM is complaining about:

java.lang.OutOfMemoryError : unable to create new native Thread

$ ps -eLF| grep -c java
$ ulimit -u

When you hear the words IE 8 or any derivative, you shudder at the thought of having to hack away at nice standards compliant code to get it to work. Unfortunately in an enterprise setting, you can’t just ignore the IE users. Microsoft has in-grained themselves in the big enterprises and IE is one of those staple products that you must support.

Today we (some other colleagues) learned that IE 8 running on Citrix, Windows Server 2003, does not like minified javascript. We had instances of it crashing/disconnecting the browser/session when attempting to invoke it inside an ExtJs application. Basically the ExtJs application has a hidden tab, that hits a standalone site, the standalone site contains uglify compressed code, whether its a processing limitation or a strictly IE behavior, we are unsure. we just know that if we don’t minify the code, it no longer crashes.

So beware of minify/compress on javascript if you wish to support IE 8. Also, if you are using grunt or uglify, make sure to turn on es3:true.

This lil hack really helps when using Git cli. Basically the script will auto-detect if you are in a git repository, display the current branch as well as different colors depending on the status.

You will need to put this in your .bash_profile (these are Mac OS X specific instructions, not sure how to do it on a Windows box, on a *nix box- you should be able to use .bashrc)


source ~/.git-completion.sh
source ~/.git-prompt.sh

GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWCOLORHINTS=1
PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'

You will need to copy git-completion.bash to .git-completion.sh and git-prompt.sh to .git-prompt.sh in your home directory.

You can get it here

The other day I spilled naked juice on my macbook pro, I immediately shut it off, and dried it out. I quickly wiped it off with some isopropyl alcohol and let it dry overnight upside down. I waited about 2 days.

I took the laptop apart, looking for any signs of liquid damage, luckily there was none. It did smell fruity tho. I even checked the logic board to see if there were any issues. None.

So I put the laptop back together and pressed the power button. NOTHING. I did a quick search online, found iFixIt…I’ve known about them for a long time, and usually use their site as a way to see the basic steps of how to disassemble. Looked around and found that its possible that only the keyboard shorts, and if that happens then the power button wont work.

There is a way to jump the keyboard so that the laptop will turn on. On the keyboard connector, near the middle there are 2 pins that you just have to jump together, I used my screwdriver to do it. And miraculously my laptop turned on. Awesome. My trackpad was still working also.

kb_shortjump

I looked further on the iFixIt site, and they only sell the full upper assembly for $299, and not the individual keyboard, I don’t need the full upper assembly because only the keyboard is shorted, not the trackpad. So I looked online and found some keyboard replacements for $30. I went with PT Supermarket, the website looks kinda sketch, but we’ll see how it goes.

Another site that I found pretty useful was:
EveryMac – you can search for your computer model by serial number. This is how I verified that the keyboard model would work in my laptop.

My macbook pro was a MacBook Pro “Core 2 Duo” 2.26 13″ (SD/FW) 2.26 GHz Core 2 Duo (P8400)
and the Keyboard (A1278) matches.

After the upgrade to iOS 6.1.3, I experienced massive degradation on the battery performance; to a point where the phone was unusable. I’ve tried many things, from turning off gps locations, turning off wifi, setting it in airplane mode, removing access to calendars, turning off iCloud related functionality, and closing out all the apps.

Temporarily Fixed.

I think I found a decent solution. It seems that iOS 6.1.3 somehow breaks the push and exchange process, by turning off push on exchange accounts, my phone seems to work normally again. the only drawback is now when getting email, you have to load up mail for it to go fetch.