Subversion Cheat Sheet

Subversion Cheat Sheet

Graphic showing SVN hierarchy

This Subversion cheat sheet was created during the initial setup of Subversion on Apache 2.0 on Windows and Mac OS X. A detailed tutorial covering most of the features of Subversion can be found in the online Subversion book. However, to make Subversion more useful for me, I created this Readers’ Digest version.

Checking Out a Project – svn checkout

To start using the version control features check out a project into your local working directory. This is done with the following command:

UNIX

svn checkout file:///repository_name/project/trunk project

Windows

svn checkout file:///d:/repository_name/project/trunk project

Network

svn checkout http://host_name/svn_dir/repository_name/project/trunk project

Reviewing Changes – svn status

To see what files you have changed or added to your checked out work, use the update command:

UNIX

svn status

svn status -u

This command will give you a listing of new files, files that have been changed, and files that have been deleted. New files or deleted files must be added or removed using the add and delete commands (see more below.)

Committing Changes – svn commit

Once you have added, deleted, or changed files or directories, you can then commit those changes to the repository. This command is pretty straightforward:

Network

svn commit -m "Saving recent changes" http://localhost/svn_dir/repository/project_dir

Updating Your Local Files – svn update

If you have a set of files checked out and would like to update them to the most recent version of files in the repository, use the update command.

Network

svn update

If there are newer files in the repository, they will overwrite any files you have locally. Before using this command, you may want to use the svn diff command to find out what the differences are between your local files and the repository.

Tagging Projects or Creating Project Specific Versions

Subversion does not track the version numbers for individual projects automatically. Instead, it tracks each update to the repository and tracks the versions of these updates. To create interim project releases, you must create “Tags” which identify a specify version of a project. This is done by making a virtual copy of a project in the tags directory. For example:

svn copy http://host_name/repos/project/trunk http://host_name/repos/project/tags/0.1.0 -m "Tagging the 0.1.0 release of the project"

This creates a sort of bookmark or snapshot which records the current state of the project. Then, you can checkout the project in this state at any time by simply referring to that release number.

To get a list of the releases for a project.

svn list http://192.168.0.4/svn/repos/prj1/tags
0.1.0/

Test audio file

Testing an audio file.

QuickTime

[quicktime]http://clay.freedomblogging.com/files/2009/01/06-rosie.mp3[/quicktime]

Generic Video

[videofile]http://clay.freedomblogging.com/files/2009/01/06-rosie.mp3[/videofile]

Hacking IE CSS: Underscore, Box Model ‘Voice Family’, & Star hacks

CSS Hacks

Underscore Hack

/* CSS hack for IE 6 and below */
.test {
  position: fixed;
  _position: absolute;
}

Voice Family (Box Family or Tantek Hack)

/* CSS hack for IE 5.x */
.test {
  width: 500px;
  padding: 50px;
  voice-family: ""}"";
  voice-family: inherit;
  width: 400px;
}
html>body .test{
 width: 400px;
}

Backslash Hack

/* CSS hack for IE 5.5 and below */

.test {
  height: 500px;
  height: 400px;
}

Commented Backslash Hack

/* begin hiding from IE5 Mac */
.test {
  color: red;
}
/* end */

And then there’s:

/* apply ONLY to IE5 Mac *//*/
.test {
  color: red;
}
/* end */

High Pass Filter

/* CSS hack hides from browser which don't support @import */
  @import "null.css?"{";
  @import "highpass.css";



	

CSS Implementations of the Rich and Famous

CSS Implementations of the Rich and Famous

A great way to improve your CSS skills is to check out the stylesheets used by other websites. Digging behind the scenes and exploring some applied CSS provides new ideas and insights about everything from specificity and formatting to hacks and shortcuts. Learning CSS by reading about ideal cases and theoretical applications is certainly important, but actually seeing how the language is applied in “real-world” scenarios provides first-hand knowledge and insight. While there are millions of standards-based, CSS-designed websites to explore, studying a few of the Web’s elite players and CSS experts helps to put things into perspective by providing context for subsequent CSS investigations. Prime candidates include industry leaders, standards buffs, CSS specialists, professional bloggers, and other successful establishments. In this article, we reveal the CSS implementations used by the following “rich and famous” websites: