Ever accidentally do an svn checkout instead of an export? Here’s a command-line snippet to take care of those hidden .SVN directories:
rm -rf `find . -type d -name .svn`
Warning: Take great care when using “rm –rf” always.
Ever accidentally do an svn checkout instead of an export? Here’s a command-line snippet to take care of those hidden .SVN directories:
rm -rf `find . -type d -name .svn`
Warning: Take great care when using “rm –rf” always.
Here’s a snippet of JS code that might come in handy if you, let’s say, would like to filter out what type of content to display depending on your website user’s OS. A real-life example would be having a download link show up to user’s who have a client that was only published on Windows.
// This script sets OSName variable as follows:
// "Windows" for all versions of Windows
// "MacOS" for all versions of Macintosh OS
// "Linux" for all versions of Linux
// "UNIX" for all other UNIX flavors
// "Unknown OS" indicates failure to detect the OS
var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
document.write('Your OS: '+OSName);
Note: An alternate way can be found via PPK’s quirksmode.org
Searching for WordPress Plugins seems to not be very helpful. The results that comes up on the page ain’t helping out. Although, there’s a “you may also try your search at Google” link below the results page—it should be easier to find the right ones.
Hmmm… will see if I have time to create maybe a boormarklet. Unless there’s one already… anyone? For the time being, bookmarking or copy-and-pasting the following would be best and make things efficient:
http://www.google.com/search?hl=en&q=site%3Awordpress.org%2Fextend%2Fplugins%2F+
Note: You should be able to add your search keyword(s) after the “+” plus-sign. For example:
http://www.google.com/search?hl=en&q=site%3Awordpress.org%2Fextend%2Fplugins%2F+test
<script type="text/javascript">
$(document).ready(function() {
someFunction();
…
});
</script>
Well, just re-reading some of the current bookmarks in my bag. To note:
I am trying to clean up and make things more efficient here at work. One goal would be to have a base CSS that will serve as a starting point for our Producers and Frontend peeps. Another goal would probably be a convention on how to use it and/or create new classes and IDs.
One of the things that keeps coming up lately would be the naming convention of classes and IDs. I used to implement this kind of format “class_name”. Then, only to switch to “class-name” in early ’06. Fast-forward to a couple of months into the year during a project, I came to find out that if you are referring to either a classname or an ID (i.e. getElementById, or something like that) that the value’s hyphen get stripped out. Can someone confirm this phenomena and/or myth? That is, for example, doing “id-name” would be implemented like so:
document.getElementById("idname")
With that however, would it be more readable using a camelCased name? Although against Tantek’s step #4 in terms of saving the user(s) potential headaches. But would there be problems if there was a standard within one’s organization? That is, classes and IDs written as a variable, i.e. somethingLikeThis; no hyphens and no underscore.
I look forward to hearing your endless wisdom on this subject sirs and madams. Thanks in advance.