Symbolic links in Windows

Symbolic links can be very useful, but if you are a Windows user, you've had to use junction points because there hasn't been native support for symbolic links until recently.

Windows Vista and Windows Server 2008 now support symbolic links mklink command. See Junfeng Zhang's write up on the mklink command.

For those using Windows 2000 or XP, you'll still need to use junction points to achieve a similar effect. Microsoft has a KB article on creating junction points, but there are some drawbacks to manually trying to manually manage junction points.

Fortunately, there are tools available that ease the pain of using junction points and prevent you from having to know all of the command line options. One such tool is NTFS Link, which provides shell integration for junction points. You can simply right-click in a folder and select New > NTFS Junction Point. Then select the target folder to link to and a "new" folder, named "Link to target folder" will be created in the directory you are in.

So, if you are a Windows user, you now have a couple of different options for creating and using symbolic links!

Topics:

SimpleModal Contact Form (SMCF) 1.1 Released

SMCF 1.1 includes the following changes:

  • Fixed image pre-loading to actually pre-load ;)
  • Added new effects on form open and close
  • Added a security feature
  • Added optional subject and cc sender form elements
  • Added common classes to form elements
  • Renamed all classes and ID's to prevent collisions
  • Added WordPress translation ability on text elements (__() and _e() functions)
  • Upgraded to SimpleModal v1.1.1 and jQuery 1.2.3
  • Moved SimpleModal and SMCF JavaScript file loading to the footer

For more information and the download, please visit the SMCF WordPress Plugin Page.

Topics:

Finding files containing a certain value

Searching for files containing a certain string/text/value is something that I do quite often. There are a number of ways to perform a "find files containing 'foo'" search, but for me, nothing beats the simplicity and power of the command line!

In Windows:

findstr /s /n /i /p foo *

The above example of findstr will print out the relative file name/path and line number (/n) in a recursive (/s), case insensitive (/i) search for the string foo (foo) in all files (*), ignoring files with non-printable characters (/p).

For a literal string, you can use the /c option:

findstr /s /n /i /p /c:"foo bar" *

There are a number of other options, but those are the ones I use most often. To restrict your search to certain files, just change the * to the pattern you are looking for, like: *.txt or *.css, etc.

For Unix:

grep -rni foo *

The above example of grep will print out the relative file name/path, matching content and line number (-n) in a recursive (-r), case insensitive (-i) search for the string foo (foo) in all files (*).

To search for a literal string, just put the search pattern in quotes.

If you just want to see the relative file name/path and don't care about the line number/content, you can use:

grep -rli foo *

And since these are commands I use all the time, I usually set up "shortcuts", so that I don't have to type out long commands with lots of options.

In Windows, you can create a batch file, called grep.bat for example, with the following:

findstr /s /n /p /i /c:"%1" %2

Then from the command line, just type grep foo *. For this to work, grep.batch needs to be in a folder that is in your PATH environment variable.

In Unix, there are a number of ways to do this, but I tend to just create an alias. For example, from the command line:

alias search='grep -rni'

Then from the command line, just type search foo *. Of course, you can just about any word/letter in place of search, just as long as it's not a reserved/system keyword. Lastly, you can add the alias command to a startup file and it will be available to you every time you log in.

Topics:

Why I hate Gmail

Ok, so I don't really hate Gmail, but I am pretty annoyed right now. Every time I try to send an email, I get an alert saying "An error occurred trying to send the message".

Despite my best-efforts to follow Gmails TOS, I believe that my account has been disabled...hopefully only temporarily. And here's why:

Read more »

Topics: ,

SimpleModal Contact Form (SMCF) 1.0 Released

SimpleModal Contact Form (SMCF) is an Ajax powered modal dialog contact form for WordPress.

The project and all of the information about it is hosted on WordPress.org.

If you have any feedback regarding the plugin, please let me know.

Topics:

Why I love Gmail

I manage 14 different email addresses through one single Gmail account. Any idea how many spam emails I get to those addresses in a 30-day period?

Read more »

Topics: ,

SimpleModal v1.1 Released

There are three new options and the handling of data has been revamped. For more details, including documentation, demos, tests and downloads, visit the project page.

I'm finishing up a WordPress plugin based on SimpleModal, which should be ready soon. The Contact link above is powered by the new WordPress plugin.

Topics:

jQuery bug – Ajax ‘no-cache’ parameter

In jQuery 1.2.1, when using the $.ajax function with cache: false, jQuery appends a parameter with the current timestamp to the URL. This parameter makes the URL unique and therefore prevents subsequent request from being retrieved from the browser cache.

However, the code that adds this 'no-cache' parameter does not check to see if it already exists and so under certain circumstances you can end up with URL's that look like:

http://mysite.com/file.html?_=1196716041523&_=1196716462963&_=1196716464245

It certainly makes the URL unique :)

I opened a ticket and submitted a patch, which was quickly optimized by a jQuery developer, davidserduke.

It's nice to see a project with responsive, helpful developers.

Topics: ,
  1. Pages:
  2. 1
  3. 2
  4. 3
  5. 4
  6. 5
  7. 6
  8. 7
  9. 8
  10. 9
Eric Martin
1home
2blog
3projects
4photography
5about
6contact
ssearch
ccomment
p/←previous
n/→next
ttop