On Development


Sublime Text 2, Fetch Settings, and Zen Coding

I recent­ly been using Sub­lime Text 2 as my text-edi­tor (for text, code, etc.). I was using Text­Mate 1.5.x before­hand, but that project hasn’t been updat­ed in a while (oth­er than Text­Mate 2.0 Alpha’s of course). Any­ways, Sub­lime Text 2 is pret­ty fast. I can’t wait to see what else it can do with future improve­ments, espe­cial­ly once it gets out of beta-devel­op­ment.

If you are new to it, you may have a read over at Net­tuts+ for some tips & tricks. Also, be sure to check-out the Zen Cod­ing project.

Zen Cod­ing is an edi­tor plu­g­in for high-speed HTML, XML, XSL (or any oth­er struc­tured code for­mat) cod­ing and edit­ing. The core of this plu­g­in is a pow­er­ful abbre­vi­a­tion engine which allows you to expand expressions—similar to CSS selectors—into HTML code.

You may install the Zen Cod­ing pack­age via Sub­lime Text 2’s Pack­age Con­trol (instruc­tions are in the linked Net­tuts+ arti­cle above).

Con­tin­ue read­ing →

Use Google.com Search Instead of Country Redirect Version

For those trav­el­ling with their lap­tops and have used Google search, you may have noticed that it does a coun­try redi­rect based on your IP address. For exam­ple, I vis­it­ed the Philip­pines this past month and instead of the usu­al google.com, it redi­rect­ed and used google.com.ph. After get­ting back to the US, my search­es would still redi­rect to using the .ph ver­sion. I even checked that the Search Engines set­tings (in this case in Chrome/OSX) didn’t have it.

Any­ways, in case you run into the same sit­u­a­tion, do the fol­low­ing:

  1. Open up Ter­mi­nal
  2. Go to ~/Library/Application Support/Google/Chrome
  3. Open the file “Local State” either w/ vi or a text edi­tor
  4. Search for the strings “last_known_google_url” and “last_prompted_google_url” and replace their val­ues to your pre­ferred Google base URL. In my case, “http://www.google.com/”.
  5. Save the file and exit
  6. Restart Chrome.

That should do the trick. For Win­dows and oth­er sys­tems, you may check out this page for the steps. Almost the same, just dif­fer­ent paths.

Hope that helps.

Fix Full Screen Issues by Video Embedder WordPress Plugin

If you are hav­ing prob­lems try­ing to dis­play an embed­ded video(s) in your posts like me, then this might help you out. I usu­al­ly embed videos from Hulu, Vimeo and YouTube most­ly. But it’s been a prob­lem try­ing to have the lat­ter 2 dis­play in fullscreen mode.

For Vimeo, the fullscreen icon/grpahic dis­plays on the over­lay of the video. But press­ing on it, just paus­es the video and noth­ing else. For YouTube, there was no fullscreen icon/graphic in the first place. I think that might have been caused by some code changes on YouTube’s end.

Mean­while, it seems that the author of Video Embed­der, Kristof­fer Fors­gren, hasn’t been able to update the plu­g­in since 2009. So for those like me who still finds good use for the plu­g­in, it was a let down not find­ing any new comments/updates since August of 2009.

Con­tin­ue read­ing →

Bash Completion, Along with SVN and Git Tab Completion

Time is pre­cious. I installed these util­i­ties to save some of it:

I install bash-com­ple­tion via Mac­Ports on my Macs.

sudo port install bash-completion

I then saved this svn-com­ple­tion script to local­ly, and did a sudo cp:

sudo cp bash_completion /opt/local/etc/bash_completion.d/svn-completion.sh

Note: “bash_completion” is the file linked on “svn-com­ple­tion script”. I hope that avoids con­fu­sion.

Last but not least, I then installed the git-com­ple­tion script. I first checked the ver­sion of Git I have via Mac­Ports which hap­pens to be 1.6.0.5.1 I then saved and untarred the Git tar­ball of the ver­sion I have local­ly. Then did anoth­er sudo cp of the actu­al git-com­ple­tion script to the same direc­to­ry where my svn-completion.sh is locat­ed at:

sudo cp git-1.6.0.5/contrib/completion/git-completion.bash /opt/local/etc/bash_completion.d/git-completion.sh

After that, I added the fol­low­ing to to my .pro­file (or .bash_profile):

# for bash-completion
if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion
fi
source /opt/local/etc/bash_completion.d/svn-completion.sh
source /opt/local/etc/bash_completion.d/git-completion.sh

Either restart your Ter­mi­nal, or re-exe­cute your .pro­file, and that would do it.

For more info on Git com­ple­tion, check out this arti­cle by Kamal Fariz (bit­flu­ent).

  1. Got it by using git ver­sion. []