WordPress.com Code Formatting…How Did I Not Know This!?

Somehow I have lived with pre blocks on this blog for much to long. On WordPress.com blogs (like this one), you can syntax-highlighted code very easily:

your code here

WordPress supports a wide variety of languages.

References


Front End Automation

Front End Automation

Great deck, full of fweb development resources.


Free Programming Books

Free Programming Books


Git: Easily Remove Multiple Files After Deletion

I almost always forget to “git rm <file>” before deleting it.  Here’s a quick way to pull deleted files from a Git repository and remove them:

git rm $(git ls-files --deleted)

UDID without iTunes

Quick Tip:

It’s possible to find the UDID of an iOS device without iTunes (with the device plugged in to your Mac):

  • Launch “System Information” via Spotlight”
  • Select “USB” from the Hardware section on the left
  • Expand the various sections to find the device and select it
  • In the bottom panel, the “Serial Number” value is the UDID

Superscript, Subscript Positioning with CSS


sup, sub {
vertical-align: baseline;
position: relative;
top: -0.4em;
}
sub { top: 0.4em; }

Reference:
http://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/


Heroku: Moving existing repository to a new location

Faced this a few times now that I am on a new laptop…moving an existing repository and app to a new location. It’s really a two step process:

  1. Pull the existing Git repo into the new location:

    git clone git@heroku.com:.git 
    
  2. Change the Heroku configuration on the existing repo (not sure if I explained that quite right):

    cd 
    git remote rm heroku (this may fail, no worries)
    git remote add heroku git@heroku.com:.git
    

You can also use

git remote -v

to understand what is being pushed where.