Clean Up Google Drive Icon Files

I had a Git repo that I was storing on Google Drive (Yes that probably was not a great idea, but it was a lazy way of sharing some pdfs in the repo with a non-technical coworker). The Google Drive app on the Mac uses an “Icon” file to indicate sync statuses of folders.  Unfortunately this kept screwing up the repo by also putting “Icon” files in all the folders in the .git directory.  Having the repo was more important than it being in Google Drive so I moved the folder out of Google Drive.  Once the folder was moved the “Icon” files remained and the repo was still throwing an error when I tried to code in Adobe Brackets.

Here is how I cleaned up all the Google Drive “Icon” files.

WARNING: BE SURE YOU DON’T HAVE FILES NAMED WITH “Icon” AS THE FIRST 4 LETTERS OR THIS WILL DELETE THEM.

  1. Open terminal
  2. Change directories into the folder that was once in Google Drive
  3. Issue the following terminal command:
    find . -name 'Icon*' -type f -delete

Now the repo is back to normal.

Copy files from one Windows server to another and retain permissions

Just want the script?

If you don’t want to read the blah blah blah you can access robocopy-script on Github

I want to know the details…

At my day job I was tasked with migrating several websites and folders from one Windows server to another. The sites have a ton of quirky permissions settings because they are mostly intranet sites. Several have anonymous browsing turned off. As you may or may not know if you just copy them via drag and drop in File Explorer you will lose all of those permissions that took years to refine. Additionally you will lose creation dates, etc.

After some research I determined that Robocopy was what I needed to retain all that valuable cruft information. Unfortunately (or fortunately if you dig command line stuff) Robocopy is a command line tool with quite a few flags. A little more digging revealed there is a GUI for Robocopy which allows you to save scripts, but I decided to roll my own script.

Features:

  • A simple “config” section in the script where you define the to/from locations
  • A config option to run attended or unattended (set this in the script)
  • Logging
  • Utilization of the following flags (descriptions are verbatim from the Robocopy documentation):
    • /E – Copies all subdirectories (including empty ones).
    • /SEC – Copies NTFS security information. (Source and destination volumes must both be NTFS). Equivalent to /COPY:DATS.
    • /COPY:DATSO – Copies the file information specified by copyflags, which can be any combination of the following : D – file Data. | A – file Attributes | T – file Timestamps. | S – file Security (NTFS ACLs). | O – file Ownership information.
    • /V – Produces verbose output (including skipped files).
    • /TEE – Displays output in the console window, in addition to directing it to the log file specified by /LOG or /LOG+.
    • /NP – Turns off copy progress indicator (% copied). **
    • /LOG – Redirects output to the specified file, overwriting the file if it already exists.
    • /B – Copies files in Backup mode (Backup copies are not restartable, but can copy some files that restartable mode cannot). ***
    • /R:10 – Specifies the number of retries on failed copies. (The default is 1 million.)
    • /W:30 – Specifies the wait time between retries. (The default is 30 seconds.)

** I liked seeing the progress as it copied, but all those percentages get written to the log file same as the screen.
*** Consider /Z to use restartable mode.

Obviously you could tweak the flags in the script to get a combination more suitable for you.

If this sounds like something you might find useful you can access robocopy-script on Github. I should note that this is my first public repo on Github. Yay.

Best Firefox Add-ons for web developers?

I’m looking for the best Firefox Add-ons for web developers.

A few things you should know about me:

  1. I like lists.  A lot.  I make them all the time for everything.
  2. I hate repetition and drudgery in my work.  If there is a (legitimate) shortcut I want to know about it.
  3. I’m a ColdFusion web developer who dabbles in jQuery.
  4. I dig Firefox for helping me with all of the above.

Now this is where you come in… What are your favorite/most useful Firefox Ad-ins that help you get your work done on a daily basis?

Here are mine (alpha order):

  • ColorZilla – Eyedropper/colorpicker
  • Dummy Lipsum – Generate “Lorem Ipsum” dummy text.
  • Evernote Web Clipper – For selecting text to evernote
  • Fast Dial – Visual bookmark homepage
  • Firebug – My main usage is debugging AJAX
  • FIreGestures – Executes commands with mouse gestures
  • FireShot – Screen shot utility
  • iMacros – Awesome utility for building test cases or automating repetitious tasks
  • TinyURL Generator – Generates TinyURLs
  • Web Developer – Adds tons of tools (too numerous to list)
  • Xmarks – Sync your bookmarks across multiple machines (and platforms!)

Thanks, I look forward to hearing from you.

Hide .lck files (and others) in Aptana on the Mac

I’m test driving the Aptana Studio plugin for eclipse.¬† It looks very slick.¬† Just a quick “how to” note for hiding files (like Dreamweaver .lck files, hidden system files, etc) in the project window.

  • Click the Project Window Tab
  • Hit FN+CMD+F10
  • Select “Filters…” in the dialog that opens
  • Check the boxes beside all the types you want to hide
  • Click ‘Ok’

Pretty simple.  So why did it take me an hour to figure it out :-|

ColdFusion Dying… Again

So I took some database training with Global Knowledge last week.¬† My office paid for the training.¬† Apparently that “back end” training may be all for naught though since my front end programming language is on life support.

Today’s Global Knowledge newsletter letter informed me (in very cheeky fashion) that ColdFusion is # 5 on their “Dying Technology” list:

“If any of these skills are your main expertise, perhaps it’s time to retrain.”

Here’s the whole article: http://www.globalknowledge.com/training/generic.asp?pageid=2347&country=United+States

The notion of ColdFusion being dead has been debated into the ground so I’m not going to belabor it.

IMHO, ColdFusion is the best thing that ever happened to me from an IT standpoint.¬† If you want to get things done quickly, easily and reliably use it.¬† If you are thinking of ColdFusion along with COBOL, Netware, Flannel Shirts and “Grunge” Bands From Seattle, and¬† you might want step outside your house more.¬† It’s not the mid 90’s anymore.

Rename a Subversion Repository

The scenario: You have a folder called code-repo where you keep all your svn repositories (let’s assume it is located in the root c:/ on a Windoze system).  You have a repository named xproject.  For some reason you need to rename the repository.  Let’s say it needs to by yproject.  There are 3 steps to rename the repository and retain all the history you have in the repo.

  1. Create an svn dump file of the xproject repo: svnadmin dump C:\code-repo\xproject > c:\xproject.dmp
  2. Create the new yproject svn repo: svnadmin create C:\code-repo\yproject
  3. Load the dump of the old repository into the new one: svnadmin load C:\code-repo\yproject < C:\xproject.dmp

Sweet.

ColdFusion Idol Worship

When I was a kid I idolized athletes.  In college I idolized musicians.  As a middle aged dude I idolize superior programmers.

Today I achieved something I am very excited about. ¬†I got a couple of lines (and one of those is a comment) of code included in one of Ray Camden’s projects at RIAForge. ¬†The project is GoogleCal. ¬†It’s a ColdFusion CFC for interacting with Google’s Calendar service. ¬†My tiny, wee contribution: helping to submit an “all day” event. ¬†It is such a small, small, small, small, small (keep going), miniscule piece of Ray’s project, but just to be able to contribute ANYthing to someone who gives so much to the CF community is freaking AWESOME.

Check it GoogleCal out here.