Archive for the ‘Source Control’ Category

10 Flex Builder 3 Tips

Wednesday, May 21st, 2008

Draft

  1. Bookmarks
  2. Mark Occurrences. Highlight/SidebarMarkers
  3. Find Next/Previous
  4. Apple + Option + Up/Down Arrow Duplicate line
  5. Apple + D Delete current lines.
  6. Apple + Shift + R Open Resource like TextMate's find in project.
  7. Apple + K Go to next occurrence
  8. Apple + Shift + K Go to previous occurrence
  9. Use Flash Components in Flex ActionScript Project.
    Directions from the ActionScript 3.0 Cookbook or see Colin Moock's post

How to set environmental variables in Unix

Wednesday, April 2nd, 2008

I often use SubVersion from the command line to manage my projects and I quickly became tired of typing in the full urls to repositories. I'm now storing these long paths in environmental variables. So for example I previously had to type
svn copy http://repo/svn/spoonermedia/projectname/trunk http://repo/svn/spoonermedia/projectname/branch/feature1 to make a branch. After setting up an environmental variable I only have to type

svn copy $R/trunk $R/branch/feature1

Okay if your sold on Environmental Variables this is how you do it.

  1. Look in "/Users/your-user-name" for a .profile or .bash_login file. If you have both then open up .bash_login or if you have neither create a .profile file.
  2. In that file you can use the export command to set all the variables you need. Each of these variables should be in uppercase.
    export W=/Users/jspooner/Documents/veoh/FlashPlayer/branches/wolverine
    export T=/Users/jspooner/Documents/veoh/FlashPlayer/tags
    export B=/Users/jspooner/Documents/veoh/FlashPlayer/branches
    export SVNROOT=http://repo/svn/src/FlashPlayer/
    

You can also use alias and functions to do other task like open and close projects. Here are some of the other shortcuts I have.

## Open my current project
alias wolverine="cd /Users/jspooner/Documents/veoh/FlashPlayer/branches/wolverine && pwd && echo WELCOME TO WOLVERINE"
# mate
alias edithost="mate /private/etc/hosts"

alias stopmysql="sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist"
alias startmysql="sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist"
# 
# # functions
# # change directories. echo PWD and show a list
cdd () { cd ${1}; echo $PWD; ls; }

OS X 10.5 Virtual Host and PHP

Tuesday, January 29th, 2008

I found instructions for editing the host file and enabling PHP at 456bereastreet.com.

What is a host file? Lets say your editing website locally and would like to bypass any security errors caused by the localhost url. You can use the host file to redirect the real url "www.jonathanspooner.com" to point at your local copy.

I also added a short cut to my profile document so I can just type 'host' in terminal and TextMate will open the doc.
To do this create a file named .profile in your users directory "/Users/yourusername/" and bash script like the one below. I have a few other handy shortcuts in there too.

alias host="mate /private/etc/hosts"