#Development


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­ally embed videos from Hulu, Vimeo and YouTube mostly. 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 pauses 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­gin since 2009. So for those like me who still finds good use for the plu­gin, it was a let down not find­ing any new comments/updates since August of 2009.

Con­tinue reading →

News from Apple WWDC 2009

apple-wwdc-20090608-0612

For those that don’t know, Apple’s WWDC (World­wide Devel­op­ers Con­fer­ence) 2009 was this past Mon­day morn­ing at Moscone West, San Fran­cisco. It’s pri­mar­ily for those devel­op­ing for Apple’s prod­ucts (OS X, iPhone apps, etc.) but it’s also for the Apple fans out there as the Keynote usu­ally addresses new prod­uct releases, etc.

I was tuned in, lis­ten­ing to Ustream’s live stream of the Keynote.1 Pretty cool as you can mul­ti­task ver­sus hav­ing to read every new updates on a blog. Though you have to give it up though as the pho­tos on the blog updates are more eye candy.

Con­tinue read­ing →

  1. The recorded stream can be seen here. Apple’s offi­cial recorded video here. []

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-completion via Mac­Ports on my Macs.

sudo port install bash-completion

I then saved this svn-completion script to locally, 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-completion script”. I hope that avoids confusion.

Last but not least, I then installed the git-completion 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 locally. Then did another sudo cp of the actual git-completion script to the same direc­tory where my svn-completion.sh is located 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-execute 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. []

Git Info — Almost Like “svn info”

I have been try­ing to find some­thing like svn info but for Git. Luck­ily, I stum­bled upon Duane Johnson’s script. Here’s git-info.sh:

#!/bin/bash

# author: Duane Johnson
# email: duane.johnson@gmail.com
# date: 2008 Jun 12
# license: MIT
#
# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496

pushd . >/dev/null

# Find base of git directory
while [ ! -d .git ] && [ ! `pwd` = "/" ]; do cd ..; done

# Show various information about this git directory
if [ -d .git ]; then
  echo "== Remote URL: `git remote -v`"

  echo "== Remote Branches: "
  git branch -r
  echo

  echo "== Local Branches:"
  git branch
  echo

  echo "== Configuration (.git/config)"
  cat .git/config
  echo

  echo "== Most Recent Commit"
  git —no-pager log —max-count=1
  echo

  echo "Type 'git log' for more commits, or 'git show' for full commit details."
else
  echo "Not a git repository."
fi

popd >/dev/null

I made an alias in my .pro­file to make it a bit more accessible:

alias gi='. /Users/$USER/git-info.sh'