By jthomas on November 20, 2009 at 3:30 pm.
Filed under: Quick Tips and Tricks
We have a client here who manages there own web server and website deployment, but they rely on us to develop and update their site as needed. For this reason, they prefer to receive updates to their site in patch-like zip files. On our end we mange this project with a combination of Unfuddle, SVN and a staging server that mimics their server environment. When it comes time to release code it can be a bit confusing for us which files the client will need for a particular update. We rely on SVN to help.
First, we determine at which revision in the repository the updates began. We do this by referencing associated changesets inside Unfuddle (Side note; Unfuddle is a fantastic project management and source control tool that we recommend checking out.) Then, it’s just a matter of grabbing a diff from this changeset to the HEAD. From the command line, do (Where “XX” is, of course, the revision our changes start at. In doubt, we err on the side of more files than necessary.):
$> svn diff -r XX:HEAD --summarize>~/Desktop/diff.txt
This dumps a summary of the affected files into a text file on the desktop. From there we go down the list and compile our patch for the client. Easy.
By jberman on November 12, 2009 at 2:00 pm.
Filed under: Actionscript, IE
With a recent update either in IE8 or within the Flash Player, I noticed a lot of our AS2 Flash sites that load external assets were failing; either the asset wouldn’t load or it wouldn’t properly report its EVENT_LOADED event. It was happening sporadically, and usually when a lot of external assets were being loaded at the same time.
When I looked into this further I found this line of code within the “run” function that executes on an interval:
if (mc_clip.getBytesTotal( ) < 0)
{
// failed to load
bool_isLoaded = false;
clearInterval( int_interval );
dispatchEvent( new Event( this, EVENT_FAILED ) );
}
To fix it, I simply added a counter. It now checks to see if getBytesTotal( ) returns negative 10 times before finally reporting EVENT_FAILED.
However, in IE, mc_clip.getBytesTotal( ) is returning a negative number - even though the clip exists and is still loading!
Updating this code to include a wait counter to make sure this the number is still negative after 10 tries seems to have fixed it.
if (mc_clip.getBytesTotal( ) < 0)
{
if (int_wait > 10)
{
// failed to load
bool_isLoaded = false;
clearInterval( int_interval );
dispatchEvent( new Event( this, EVENT_FAILED ) );
}
int_wait++;
}
By jthomas on October 19, 2009 at 2:42 pm.
Filed under: Quick Tips and Tricks
A quick tip today for those of you looking for a way to easily toggle hidden file visibility on OS X. I found myself toggling this setting frequently via Terminal.app when working with htaccess files, so I ended up putting together a little AppleScript to make life easier.
The script works as a toggle to turn the setting on or off. So, run it once to show hidden files, then run it a second time to hide them again.
Just paste this into ScriptEditor and you’re good to go. For added automation “Save as…” as an application and drop it in your Applications folder.
try
set toggle to do shell script "defaults read com.apple.finder AppleShowAllFiles"
if toggle = "True" then
do shell script "defaults write com.apple.finder AppleShowAllFiles False"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles True"
end if
do shell script "killall Finder"
end try
Alternatively, you can just download the script here.
By admin on September 14, 2009 at 10:34 am.
Filed under: Quick Tips and Tricks
According to his personal blog (screenshots included), Joe McKay was able to prevent the appearance of sponsored ads on Gmail by referencing tragic or catastrophic events (words which Google bans from their ads), as well as words from the late, great, George Carlin’s list of seven words you can’t say on TV.
But, if you’re looking to send an email to someone of importance, and you’re not interested in throwing down some dirty words (but murder still passes through your moral filter), then Mr. McKay has come up with the perfect sentence to add onto the end of each email:
“I enjoy the massacre of ads. This sentence will slaughter ads without a messy bloodbath.”